The date x days ago

days_ago(days = 0, tzone = "")

Arguments

days

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 days ago

Examples

days_ago(3)
#> [1] "2022-03-20"
days_ago(1) == yesterday()
#> [1] TRUE