Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar arithmetic support #3147

Open
Manishearth opened this issue Feb 23, 2023 · 0 comments
Open

Calendar arithmetic support #3147

Manishearth opened this issue Feb 23, 2023 · 0 comments
Labels
C-calendar Component: Calendars help wanted Issue needs an assignee S-large Size: A few weeks (larger feature, major refactoring)

Comments

@Manishearth
Copy link
Member

Manishearth commented Feb 23, 2023

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() and month_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.

@Manishearth Manishearth added S-large Size: A few weeks (larger feature, major refactoring) C-calendar Component: Calendars labels Feb 23, 2023
@Manishearth Manishearth added this to the 1.x Priority ⟨P2⟩ milestone Feb 23, 2023
@Manishearth Manishearth added the help wanted Issue needs an assignee label Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-calendar Component: Calendars help wanted Issue needs an assignee S-large Size: A few weeks (larger feature, major refactoring)
Projects
None yet
Development

No branches or pull requests

1 participant