R/years.R
years.Rd
Converts dates to the corresponding numeric years
years(y)
A vector of class "Date" or "POSIX" date-time.
"Date"
"POSIX"
y <- Sys.time() years(y) #> [1] 2026