date2season: Get the season

View source: R/utils.R

date2seasonR Documentation

Get the season

Description

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)

injurytools documentation built on Nov. 15, 2023, 1:06 a.m.