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
When I initially started Jiff, my plan was always to stick to the Gregorian calendar. And I planned this even though Temporal specifically supports non-Gregorian calendars. Temporal has blazed a trail that shows how to support non-Gregorian calendars by effectively defining a mapping between non-Gregorian and ISO 8601 calendars (where ISO 8601 is basically equivalent to the Gregorian calendar), and then doing operations in ISO 8601 space. IIRC, there are some assumptions they make about calendars (like, numeral day 1 is always the first day of the month), but otherwise most everything is calendar independent.
My feelings on this have largely remained unchanged. I would prefer not support non-Gregorian calendars and instead point users toward other libraries, like icu_calendar, that specialize in this sort of thing.
It is possible my feelings could be changed on this matter in the future, but I think I'd want at least a few criteria to be satisfied first:
Some very compelling use cases are provided.
There aren't any plausible work-arounds external to Jiff.
A strong abstraction barrier can be defined between most of the datetime arithmetic in this library and the details of non-Gregorian calendars.
It can be an opt-in feature so that the vast majority of users that don't need this don't have to pay for it.
The text was updated successfully, but these errors were encountered:
BurntSushi
changed the title
TODO: add support for calendars other than Gregorian
add support for calendars other than Gregorian
Jul 7, 2024
When I initially started Jiff, my plan was always to stick to the Gregorian calendar. And I planned this even though Temporal specifically supports non-Gregorian calendars. Temporal has blazed a trail that shows how to support non-Gregorian calendars by effectively defining a mapping between non-Gregorian and ISO 8601 calendars (where ISO 8601 is basically equivalent to the Gregorian calendar), and then doing operations in ISO 8601 space. IIRC, there are some assumptions they make about calendars (like, numeral day
1
is always the first day of the month), but otherwise most everything is calendar independent.My feelings on this have largely remained unchanged. I would prefer not support non-Gregorian calendars and instead point users toward other libraries, like
icu_calendar
, that specialize in this sort of thing.It is possible my feelings could be changed on this matter in the future, but I think I'd want at least a few criteria to be satisfied first:
The text was updated successfully, but these errors were encountered: