Handle possible Overflow values on individual calendars#7795
Merged
Manishearth merged 4 commits intounicode-org:mainfrom Mar 20, 2026
Merged
Handle possible Overflow values on individual calendars#7795Manishearth merged 4 commits intounicode-org:mainfrom
Manishearth merged 4 commits intounicode-org:mainfrom
Conversation
d64a513 to
af5f959
Compare
sffc
approved these changes
Mar 19, 2026
Co-authored-by: Shane F. Carr <shane@unicode.org>
sffc
approved these changes
Mar 19, 2026
sffc
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7794.
overflowtakes three values:Constrain,Reject, andNone.Noneis equivalent toConstrain, but we don't have aResolvedOptionstype to fix that distinction.Almost all of
overflow-consuming code is matching the Temporal spec, and the Temporal spec handles unset values correctly, so this is by and large not a problem.However, calendar-specific code is not specced by Temporal, and any place where we handle overflows there needs to handle all cases.
@sffc and I discussed this and using
matchstatements seemed to be the most straightforward option. We could in theory introduceResolvedOptionsor pre-handle the None but most of the code is written to match the spec so this would actually potentially make the spec-matching less clear.Changelog
icu_calendar: Handle possible Overflow values on individual calendars