@@ -902,7 +902,7 @@ contributors: Google, Ecma International
902
902
<p>This definition supersedes the definition provided in <emu-xref href="#sec-temporal-nonisodateadd"></emu-xref>.</p>
903
903
<p>It performs the following steps when called:</p>
904
904
<emu-alg>
905
- 1. Let _parts_ be CalendarISOToDate(_calendar_, _baseDate_ ).
905
+ 1. Let _parts_ be CalendarISOToDate(_calendar_, _isoDate_ ).
906
906
1. Let _yearMonth_ be RegulateNonISOYearMonth(_calendar_, _parts_.[[Year]], _parts_.[[MonthCode]], _duration_.[[Years]]).
907
907
1. Let _endOfMonth_ be BalanceNonISODate(_calendar_, _yearMonth_.[[Year]], _yearMonth_.[[Month]] + _duration_.[[Months]] + 1, 0).
908
908
1. Let _baseDay_ be _parts_.[[Day]].
@@ -991,8 +991,7 @@ contributors: Google, Ecma International
991
991
1. Let _number_ be 1.
992
992
1. Let _isLeap_ be *false*.
993
993
1. Repeat, while _number_ ≤ 12,
994
- 1. Let _intermediate_ be CreateMonthCode(_number_, _isLeap_).
995
- 1. If _calendar_ contains _monthCode_ in _year_, according to a calendar-dependent algorithm, then
994
+ 1. If _calendar_ contains CreateMonthCode(_number_, _isLeap_) in _year_, according to a calendar-dependent algorithm, then
996
995
1. Set _monthsBefore_ to _monthsBefore_ + 1.
997
996
1. If _monthCodeParts_.[[Number]] is _number_ and _monthCodeParts.[[IsLeap]] is _isLeap_, then
998
997
1. Return _monthsBefore_.
@@ -1291,7 +1290,7 @@ contributors: Google, Ecma International
1291
1290
1. Let _month_ be MonthCodeToArithmeticalMonth(_calendar_, _year_, _fields_.[[MonthCode]]).
1292
1291
1. If _month_ is ~invalid~, throw a *RangeError* exception.
1293
1292
1. Else,
1294
- 1. Let _month_ be RegulateNonISOYearMonth(_calendar_, _year_, _monthCode_ , 0).[[Month]].
1293
+ 1. Let _month_ be RegulateNonISOYearMonth(_calendar_, _year_, _fields_.[[MonthCode]] , 0).[[Month]].
1295
1294
1. Else,
1296
1295
1. Assert: _fields_.[[Month]] is not ~unset~.
1297
1296
1. Let _month_ be _fields_.[[Month]].
@@ -1303,7 +1302,7 @@ contributors: Google, Ecma International
1303
1302
1. Let _regulatedDay_ be _daysInMonth_.
1304
1303
1. Else,
1305
1304
1. Let _regulatedDay_ be _day_.
1306
- 1. Return ? CalendarDateArithmeticalToISO(_calendar_, _year_, _month_, _day_ ).
1305
+ 1. Return ? CalendarDateArithmeticalToISO(_calendar_, _year_, _month_, _regulatedDay_ ).
1307
1306
</emu-alg>
1308
1307
</emu-clause>
1309
1308
0 commit comments