find_closest_year {oeli} | R Documentation |
This function takes a date as input and returns the closest year.
find_closest_year(date)
date |
A |
An integer
, the closest year to the input date.
find_closest_year(as.Date("2022-07-15"))
find_closest_year(as.Date("2022-01-01"))