Closed anba closed 2 weeks ago
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.)
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.