date2season {injurytools}R 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)

[Package injurytools version 1.0.3 Index]