as_year.Rd
Convert a date into a year
as_year(x)
an object coercible into a base::Date. See base::as.Date().
base::as.Date()
A character vector representing the years of the input
character
# Retrieve only the year as_year("1988-01-01") #> [1] "1988"