Learn R Programming

injurytools (version 2.0.1)

date2season: Get the season

Description

Get the season given the date.

Usage

date2season(date)

Value

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

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)

Examples

Run this code
date <- Sys.Date()
date2season(date)

Run the code above in your browser using DataLab