Study Year

dtt_study_year(x, start = 1L)

Arguments

x

A Date or POSIXct vector.

start

An integer scalar of the starting month or a Date scalar of the starting dayte.

Value

A character vector of the study year.

Examples

dtt_study_year(Sys.Date())
#> [1] "2020-2020"
dtt_study_year(as.Date(c("2000-03-31", "2000-04-01", "2001-04-01")), start = 4L)
#> [1] "1999-2000" "2000-2001" "2001-2002"