Closed UgyenNorbu closed 1 year ago
Your calculation is incorrect
> as.Date(44713, origin = "1900-01-01")
[1] "2022-06-03"
> ymd("2022-06-03") - ymd("1900-01-01")
Time difference of 44713 days
https://www.timeanddate.com/date/durationresult.html?d1=03&m1=06&y1=2022&d2=01&m2=01&y2=1900
When converting an integer to a date object using as_date() function from Lubridate, the output date is erroneous. For eg. 44713 should give 2022-06-01 (yyyy-mm-dd), but instead it outputs 2022-06-03.
Would appreciate if this error can be resolved at the earliest opportunity.