Skip to content

Commit ababe1b

Browse files
FrankYFTangptomato
authored andcommitted
Normative: Check +/-∞ in Intl.Duration after ToIntegerOrInfinity
Change it to align with other Temporal.Plain* constructor Close #1598
1 parent 2a79ad4 commit ababe1b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

spec/duration.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ <h1>Temporal.Duration ( [ _years_ [ , _months_ [ , _weeks_ [ , _days_ [ , _hours
3939
<emu-alg>
4040
1. If NewTarget is *undefined*, then
4141
1. Throw a *TypeError* exception.
42-
1. Let _y_ be ? ToIntegerOrInfinity(_years_).
43-
1. Let _mo_ be ? ToIntegerOrInfinity(_months_).
44-
1. Let _w_ be ? ToIntegerOrInfinity(_weeks_).
45-
1. Let _d_ be ? ToIntegerOrInfinity(_days_).
46-
1. Let _h_ be ? ToIntegerOrInfinity(_hours_).
47-
1. Let _m_ be ? ToIntegerOrInfinity(_minutes_).
48-
1. Let _s_ be ? ToIntegerOrInfinity(_seconds_).
49-
1. Let _ms_ be ? ToIntegerOrInfinity(_milliseconds_).
50-
1. Let _mis_ be ? ToIntegerOrInfinity(_microseconds_).
51-
1. Let _ns_ be ? ToIntegerOrInfinity(_nanoseconds_).
42+
1. Let _y_ be ? ToIntegerThrowOnInfinity(_years_).
43+
1. Let _mo_ be ? ToIntegerThrowOnInfinity(_months_).
44+
1. Let _w_ be ? ToIntegerThrowOnInfinity(_weeks_).
45+
1. Let _d_ be ? ToIntegerThrowOnInfinity(_days_).
46+
1. Let _h_ be ? ToIntegerThrowOnInfinity(_hours_).
47+
1. Let _m_ be ? ToIntegerThrowOnInfinity(_minutes_).
48+
1. Let _s_ be ? ToIntegerThrowOnInfinity(_seconds_).
49+
1. Let _ms_ be ? ToIntegerThrowOnInfinity(_milliseconds_).
50+
1. Let _mis_ be ? ToIntegerThrowOnInfinity(_microseconds_).
51+
1. Let _ns_ be ? ToIntegerThrowOnInfinity(_nanoseconds_).
5252
1. Return ? CreateTemporalDuration(_y_, _mo_, _w_, _d_, _h_, _m_, _s_, _ms_, _mis_, _ns_, NewTarget).
5353
</emu-alg>
5454
</emu-clause>

0 commit comments

Comments
 (0)