Closed groditi closed 1 year ago
Works fine for me with devel on linux. Which version of lubridate and timechange do you have?
> ceiling_date(
+ c(ymd('1969-01-01')+years(c(0:2))),
+ unit = 'month',
+ change_on_boundary = FALSE
+ )
[1] "1969-01-01" "1970-01-01" "1971-01-01"
> ceiling_date(
+ c(ymd('1969-01-01')+years(c(0:2))),
+ unit = 'month',
+ change_on_boundary = TRUE
+ )
[1] "1969-02-01" "1970-02-01" "1971-02-01"
I have just added this test case to our unit tests and it works as expected in the CI on all platforms and versions of R. So it's pretty surely fixed in devel. Please reopen if you keep seeing this. The new CRAN release is coming soon.
Lubridate 1.8.0 on windows, no version of timechange installed. Installed 1.9.2 from source and timechange 0.2.0 from source and that fixed it
For dates before 1970 ceiling_months will return the incorrect year if
change_on_boundary = FALSE