The date x years ago

years_ago(years = 0, tzone = "")

Arguments

years

an integer specifying the number of days to subtract from the current

tzone

a character vector specifying which time zone you would like to find the previous date of. tzone defaults to the system time zone set on your computer.

Value

The date, x years ago

Examples

years_ago(1)
#> [1] "2021-03-23"
years_ago(2000)
#> [1] "0022-03-23"