Within a time unit (boundary), find ceiling (upper, max) and floor (lower, minimum) date. The default time unit (days) return the date back.

round_date picks the closest date from ceiling and floor.

<unit>_first and <unit>_last gives the first and last day within the time unit. Use the index argument to pick the time unit level (example use 6 to pick up june in month_first).

round_date(date = today(), unit = c("days", "weeks", "months", "years"), ...)

ceiling_date(date = today(), unit = c("days", "weeks", "months", "years"), ...)

floor_date(date = today(), unit = c("days", "weeks", "months", "years"), ...)

Arguments

date

Date vector

unit

character

...

Further arguments for methods

Value

Datevector