-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Description
I recently updated lubridate from 1.7.4 to 1.9.4. On Windows, there seems to be no particular issue. But on Cent OS Linux 7 (R 3.6.0), this particular date errors. Even then, it doesn't error on Date class but (AFAICT) only on IDate. E.g., 2023-04-01 works fine on both OS with IDate too. All dates worked fine in the previous lubridate version I used. So I figure this must be a bug? There might be other dates where it errors but this was the first date where my code returned error on Linux but not on Windows (running same R version 3.6.0).
require(lubridate) # v1.9.4
require(data.table) # 1.13.2
d1 = ymd("2023-03-31")
d2 = as.IDate(d1)
# Windows
d1 %m+% months(3) # [1] "2023-06-30"
d2 %m+% months(3) # [1] "2023-06-30"
# Cent OS Linux 7 with R 3.6.0
d1 %m+% months(3) # [1] "2023-06-30"
d2 %m+% months(3) # Error: Incompatible classes: <IDate> - <Period>Metadata
Metadata
Assignees
Labels
No labels