You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
10/1/2021: Version 1.5.1 released. Changed default behavior of proleptic_gregorian to has_year_zero=T
(since it is allowed in ISO-8601 and CF does not specify the year zero convention for this calendar).
Raise warning message when trying to create a calendar that is not supported by CF version 1.9
(no years < 1 allowed for 'standard'/'gregorian' or 'julian' calendars).
To Reproduce
using CFTime, Dates
DateTimeProlepticGregorian(1,1,1) -Day(1)
# output: DateTimeProlepticGregorian(-001-12-31T00:00:00)
All calendars are affected expect DateTimeStandard and DateTimeJulian
Expected behavior
output should be DateTimeProlepticGregorian(0,12,31) as in python:
has_year_zero: if set to True, astronomical year numbering is used and the year zero exists. If set to False for real-world calendars, then historical year numbering is used and the year 1 is preceded by year -1 and no year zero exists. The defaults are set to conform with CF version 1.9 conventions (False for ‘julian’, ‘gregorian’/’standard’, True for ‘proleptic_gregorian’ (ISO 8601) and True for the idealized calendars ‘noleap’/’365_day’, ‘360_day’, 366_day’/’all_leap’) The defaults can only be over-ridden for the real-world calendars, for the the idealized calendars the year zero always exists and the has_year_zero kwarg is ignored. This kwarg is not needed to define calendar systems allowed by CF (the calendar-specific defaults do this).
Describe the bug
The handling of year 0 changed in python cftime:
To Reproduce
All calendars are affected expect DateTimeStandard and DateTimeJulian
Expected behavior
output should be
DateTimeProlepticGregorian(0,12,31)
as in python:Environment
Full output
No additional output. All reference values from python and cftime 1.6.0:
The text was updated successfully, but these errors were encountered: