Rounding functions (e.g. round_date()) accepts a Period object as unit argument, but this usage is not described in https://lubridate.tidyverse.org/reference/round_date.html. As unit accepts arbitrary strings that can be parsed into period, I guess passing Period objects is a valid usage. Is my understanding correct? If so, may I send a pull request to add some sentences about this to the doc?
library(lubridate, warn.conflicts = FALSE)
ceiling_date(today() + 1:7, days(3))
#> [1] "2020-11-07" "2020-11-07" "2020-11-07" "2020-11-10" "2020-11-10"
#> [6] "2020-11-10" "2020-11-13"
Created on 2020-11-03 by the reprex package (v0.3.0)
Rounding functions (e.g.
round_date()) accepts a Period object asunitargument, but this usage is not described in https://lubridate.tidyverse.org/reference/round_date.html. Asunitaccepts arbitrary strings that can be parsed into period, I guess passing Period objects is a valid usage. Is my understanding correct? If so, may I send a pull request to add some sentences about this to the doc?Created on 2020-11-03 by the reprex package (v0.3.0)