Calendar arithmetic support #3147
Labels
C-calendar
Component: Calendars
help wanted
Issue needs an assignee
S-large
Size: A few weeks (larger feature, major refactoring)
Milestone
For 1.0 we disabled the calendar arithmetic APIs because they had a lot of missing things and needed polish.
The full plan is to follow Temporal (specifically see
PlainDate.add()
,.subtract()
, and.until()
, as well as the actual spec docs). Temporal has put a lot of work into picking exact semantics here and we should rely on that work.The tricky thing will be making it work for non-Gregorian calendars as well since the number of months may change from year to year. The current internal CalendarArithmetic APIs have the ability to do this via
months_for_every_year()
andmonth_year()
though we may also want a more efficient one that returns an array-like object. Doing this whilst still being efficient may be hard.I'm happy to mentor an implementation.
The text was updated successfully, but these errors were encountered: