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: Merge CalendarDateAddition into CalendarDateAdd
Having two separate operations for this was already confusing just because
of the names. Combine them into an ISO 8601 part and an implementation-
defined part, as in CalendarDateToISO.
See: #2948
1. Let _result_ be an implementation-defined ISO Date Record, or throw a *RangeError* exception, as described below.
445
+
1. If ISODateWithinLimits(_result_.[[Year]], _result_.[[Month]], _result_.[[Day]]) is *false*, throw a *RangeError* exception.
446
+
1. Return _result_.
446
447
</emu-alg>
448
+
<p>
449
+
When _calendar_ is not *"iso8601"*, the operation performs implementation-defined processing to add _duration_ to _date_ in the context of the calendar represented by _calendar_ and returns the corresponding day, month and year of the result in the ISO 8601 calendar values as an ISO Date Record.
450
+
It may throw a *RangeError* exception if _overflow_ is ~reject~ and the resulting month or day would need to be clamped in order to form a valid date in _calendar_.
_calendar_: a calendar type that is not *"iso8601"*,
1180
-
_date_: an ISO Date Record,
1181
-
_duration_: a Date Duration Record,
1182
-
_overflow_: ~constrain~ or ~reject~,
1183
-
): either a normal completion containing an ISO Date Record or a throw completion
1184
-
</h1>
1185
-
<dlclass="header">
1186
-
<dt>description</dt>
1187
-
<dd>
1188
-
It performs implementation-defined processing to add _duration_ to _date_ in the context of the calendar represented by _calendar_ and returns the corresponding day, month and year of the result in the ISO 8601 calendar values as an ISO Date Record.
1189
-
It may throw a *RangeError* exception if _overflow_ is ~reject~ and the resulting month or day would need to be clamped in order to form a valid date in _calendar_, or if the date resulting from the addition is outside the range allowed by ISODateTimeWithinLimits.
0 commit comments