Skip to content

Commit c97932b

Browse files
anbaptomato
authored andcommitted
Editorial: Inline ConstrainISOYearMonth into RegulateISOYearMonth
Inline ConstrainISOYearMonth into RegulateISOYearMonth for consistency with RegulateISODate.
1 parent 90e4b34 commit c97932b

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

spec/plainyearmonth.html

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,11 @@ <h1>RegulateISOYearMonth ( _year_, _month_, _overflow_ )</h1>
504504
1. Assert: _year_ and _month_ are integers.
505505
1. Assert: _overflow_ is either *"constrain"* or *"reject"*.
506506
1. If _overflow_ is *"constrain"*, then
507-
1. Return ! ConstrainISOYearMonth(_year_, _month_).
507+
1. Set _month_ to the result of clamping _month_ between 1 and 12.
508+
1. Return the Record {
509+
[[Year]]: _year_,
510+
[[Month]]: _month_
511+
}.
508512
1. Else,
509513
1. Assert: _overflow_ is *"reject"*.
510514
1. If ! IsValidISOMonth(_month_) is *false*, throw a *RangeError* exception.
@@ -564,18 +568,6 @@ <h1>BalanceISOYearMonth ( _year_, _month_ )</h1>
564568
</emu-alg>
565569
</emu-clause>
566570

567-
<emu-clause id="sec-temporal-constrainisoyearmonth" aoid="ConstrainISOYearMonth">
568-
<h1>ConstrainISOYearMonth ( _year_, _month_ )</h1>
569-
<emu-alg>
570-
1. Assert: _year_ and _month_ are integers.
571-
1. Set _month_ to the result of clamping _month_ between 1 and 12.
572-
1. Return the Record {
573-
[[Year]]: _year_,
574-
[[Month]]: _month_
575-
}.
576-
</emu-alg>
577-
</emu-clause>
578-
579571
<emu-clause id="sec-temporal-createtemporalyearmonth" aoid="CreateTemporalYearMonth">
580572
<h1>CreateTemporalYearMonth ( _isoYear_, _isoMonth_, _calendar_, _referenceISODay_ [ , _newTarget_ ] )</h1>
581573
<emu-alg>

0 commit comments

Comments
 (0)