Skip to contents

Get the season given the date.

Usage

date2season(date)

Arguments

date

A vector of class Date or integer/numeric. If it is integer/numeric, it should refer to the year in which the season started (e.g. date = 2015 to refer to the 2015/2016 season)

Value

Character specifying the respective competition season given the date. The season (output) follows this pattern: "2005/2006".

Examples

date <- Sys.Date()
date2season(date)
#> [1] "2023/2024"