You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Editorial: Add explicit step to reject too large dates in ToTemporalYearMonth
The call to `CalendarYearMonthFromFields` will already reject too large
dates, but adding an explicit step makes it more obvious that
`ISODateToFields` doesn't require support for mapping large ISO dates to
calendar dates. And it also aligns `ToTemporalYearMonth` with
`ToTemporalMonthDay` after #3054.
1. Let _isoDate_ be CreateISODateRecord(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]]).
483
+
1. If ISOYearMonthWithinLimits(_isoDate_) is *false*, throw a *RangeError* exception.
483
484
1. Set _result_ to ISODateToFields(_calendar_, _isoDate_, ~year-month~).
484
485
1. NOTE: The following operation is called with ~constrain~ regardless of the value of _overflow_, in order for the calendar to store a canonical value in the [[Day]] field of the [[ISODate]] internal slot of the result.
485
486
1. Set _isoDate_ to ? CalendarYearMonthFromFields(_calendar_, _result_, ~constrain~).
0 commit comments