Closed kendonB closed 5 years ago
From here: https://www.unidata.ucar.edu/software/udunits/udunits-current/doc/udunits/udunits2lib.html#Time
"You should be aware, however, that the hybrid Gregorian/Julian calendar used by the UDUNITS-2 package cannot be changed. Dates on or after 1582-10-15 are assumed to be Gregorian dates; dates before that are assumed to be Julian dates. In particular, the year 1 BCE is immediately followed by the year 1 CE."
I found this through the R package
units
and it causes odd behavior in dates prior to 0200-02-28Created on 2019-03-02 by the reprex package (v0.2.1.9000)
I came across this problem in real life when using
stars::read_ncdf
on this file which stores dates with "0000-01-01" as the origin:mrso_Lmon_FGOALS-g2_historical_r2i1p1_200001-200912.zip
The above code is inside
as.POSIXct.units
.https://calendarhome.com/calculate/days-between-2-dates agrees with R and not![image](https://user-images.githubusercontent.com/5327505/53668106-cd35c880-3cd7-11e9-8cd7-685bbef279c1.png)
units
.