Get a date from a decimal year

get_date(year)

Arguments

year

Numeric value with a year, include decimals for month and day.

Value

String with date in the format: Year/Month/Day

Examples

get_date(-11996.92)
#> [1] "-11996/11/1"
get_date(-11996.83)
#> [1] "-11996/9/29"
get_date(-11996.75)
#> [1] "-11996/9/0"
get_date(2021)
#> [1] "2021/01/01"
get_date(2021.625)
#> [1] "2021/7/16"