Convert an integer to a date.
Value
A vector of dates where the input integer forms the year component. The day and month components added will by default be the 15th of June, so that tick marks will appear in the middle of the series on plots. For input, only years 0:9999 are accepted.
Examples
int_to_year(1960)
#> [1] "1960-06-15"
class(int_to_year(1960))
#> [1] "Date"
int_to_year(1960:1965)
#> [1] "1960-06-15" "1961-06-15" "1962-06-15" "1963-06-15" "1964-06-15"
#> [6] "1965-06-15"
int_to_year(1990, month = "01", day = "30")
#> [1] "1990-01-30"
