Subtract time units from a date time vector.
Usage
dtt_subtract_units(x, n = 1L, units = dtt_units(x))
dtt_subtract_years(x, n = 1L)
dtt_subtract_months(x, n = 1L)
dtt_subtract_days(x, n = 1L)
dtt_subtract_hours(x, n = 1L)
dtt_subtract_minutes(x, n = 1L)
dtt_subtract_seconds(x, n = 1L)
Examples
dtt_subtract_units(as.Date("1999-12-31"), 2L, "days")
#> [1] "1999-12-29"