date_to_sy | R Documentation |
Checks to see if a date is past the user-specified cutoff point for delineating school years, then maps to the appropriate year.
date_to_sy(date_var, last_day_of_sy = NULL)
date_var |
the date to convert. Can be a |
last_day_of_sy |
the cutoff date, after which a date is considered part of the following school year. The year of this argument does not matter. Defaults (noisily) to July 1st. |
Returns a character vector in the format of "2013 - 2014"
A character vector the same length as date_var
date_to_sy(as.Date("2014-05-05"), as.Date("2000-07-01"))
date_to_sy(as.Date("2014-07-05"), as.Date("2000-07-01"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.