The time between a date and year is calculated using July 1st of the year.
Usage
get_closest_year(x, years = as.character(1800:2400))
The time between a date and year is calculated using July 1st of the year.
get_closest_year(x, years = as.character(1800:2400))