Given a repeating cycle anchored at start and stepping every
amount units, returns the latest cycle point strictly before
current.
.prev_on_cycle(
start,
current = Sys.time(),
amount = 1L,
unit = c("second", "minute", "hour", "day", "week", "month", "year")
)A Date or POSIXct of the same class and timezone as
start, or NA if current <= start.
Date or POSIXct defining the cycle origin.
Date or POSIXct (coerced to match start)
used as the reference point. Defaults to Sys.time().
Positive integer; number of units per cycle step.
Character; one of "second", "minute",
"hour", "day", "week", "month",
"year". Sub-day units are not supported when start is a
Date.