Skip to content

Commit 987170c

Browse files
authored
Fixes a bug where values used with the iso calendar can lead to invalid month code strings. (#1360)
1 parent 152bc7a commit 987170c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spec/plainmonthday.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,8 @@ <h1>ToTemporalMonthDay ( _item_ [ , _constructor_ [ , _options_ ] ] )</h1>
377377
1. Let _fields_ be ? ToTemporalMonthDayFields(_item_, _fieldNames_).
378378
1. Let _month_ be ? Get(_fields_, *"month"*).
379379
1. Let _monthCode_ be ? Get(_fields_, *"monthCode"*).
380-
1. If _calendarAbsent_ is *true*, and _month_ is not *undefined*, and _monthCode_ is *undefined*, then
381-
1. Set _monthCode_ to ! ToString(_month_).
382-
1. Perform ! CreateDataPropertyOrThrow(_fields_, *"monthCode"*, _monthCode_).
380+
1. If _calendarAbsent_ is *true*, and _month_ is not *undefined*, and _monthCode_ is *undefined* and _year_ is *undefined*, then
381+
1. Perform ! CreateDataPropertyOrThrow(_fields_, *"year"*, *1972*<sub>𝔽</sub>).
383382
1. Return ? MonthDayFromFields(_calendar_, _fields_, _constructor_, _options_).
384383
1. Perform ? ToTemporalOverflow(_options_).
385384
1. Let _string_ be ? ToString(_item_).

0 commit comments

Comments
 (0)