-
Notifications
You must be signed in to change notification settings - Fork 154
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
CalendarMonthDayToISOReferenceDate: Throw RangeError if resolved date is outside of valid limits #2997
Comments
Given #2869 I am skeptical about the accuracy of these dates, but this is a good point. It's possible that we trip an assertion here, so we should add this. Note that as of #2996, this is no longer a note in CalendarDateToISO, but an actual step in CalendarDateFromFields/CalendarYearMonthFromFields. So I'll add a similar step in CalendarMonthDayFromFields. |
(I'm hesitant to add a test262 test for this, though, since it may be based on spurious data.) |
This was previously not thought necessary, but some month-day combinations are rare enough in the Chinese lunar calendar that they might occur only outside of the representable range. Failing this check would hit an assertion elsewhere anyway, so this is editorial. Closes: #2997
This was previously not thought necessary, but some month-day combinations are rare enough in the Chinese lunar calendar that they might occur only outside of the representable range. Failing this check would hit an assertion elsewhere anyway, so this is editorial. Closes: #2997
This was previously not thought necessary, but some month-day combinations are rare enough in the Chinese lunar calendar that they might occur only outside of the representable range. Failing this check would hit an assertion elsewhere anyway, so this is editorial. Closes: #2997
This was previously not thought necessary, but some month-day combinations are rare enough in the Chinese lunar calendar that they might occur only outside of the representable range. Failing this check would hit an assertion elsewhere anyway, so this is editorial. Closes: #2997
CalendarMonthDayToISOReferenceDate
should have the same note as inCalendarDateToISO
to disallow dates outside the valid limits:Reason: The resolved year can be far into the past and may be outside the valid limits.
The maximum year for ICU4X is -5738:
ICU4C computes dates possibly even further into the past. -239723 is computed as the first year where
M09L-30
exists:ICU4C doesn't compute any 30 days months for
M01L
,M10L
,M11L
, andM12L
inside theDate
limits. But it's possible that ICU4C can compute 30 days leap months outside those limits.The text was updated successfully, but these errors were encountered: