Learn R Programming

cbbreadr (version 1.0.2)

most_recent_season: get the most recent CBB season

Description

For a given date (defaults to the system date), returns the most recent or "current" college basketball season.

Usage

most_recent_season(date = Sys.Date())

Value

the most recent CBB season as an integer

Arguments

date

the date to obtain the most recent season of. Defaults to the system date.

Examples

Run this code
# \donttest{
most_recent_season()

most_recent_season("2022-09-01") # up to september, will be recorded as 2022

most_recent_season("2022-10-01") # then will swap over to 2023 when we hit october
# }

Run the code above in your browser using DataLab