Skip to content

Commit 506ff86

Browse files
anbaptomato
authored andcommitted
Editorial: Move CheckISODaysRange from GetPossibleEpochNanoseconds to callers
1 parent df3ddd9 commit 506ff86

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spec/timezone.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ <h1>
276276
</dd>
277277
</dl>
278278
<emu-alg>
279+
1. Perform ? CheckISODaysRange(_isoDateTime_).
279280
1. Let _possibleEpochNs_ be ? GetPossibleEpochNanoseconds(_timeZone_, _isoDateTime_).
280281
1. Return ? DisambiguatePossibleEpochNanoseconds(_possibleEpochNs_, _timeZone_, _isoDateTime_, _disambiguation_).
281282
</emu-alg>
@@ -324,6 +325,7 @@ <h1>
324325
1. Let _earlierTime_ be AddTime(_isoDateTime_.[[Time]], _timeDuration_).
325326
1. Let _earlierDate_ be AddDaysToISODate(_isoDateTime_.[[ISODate]], _earlierTime_.[[Days]]).
326327
1. Let _earlierDateTime_ be CombineISODateAndTimeRecord(_earlierDate_, _earlierTime_).
328+
1. Perform ? CheckISODaysRange(_earlierDateTime_).
327329
1. Set _possibleEpochNs_ to ? GetPossibleEpochNanoseconds(_timeZone_, _earlierDateTime_).
328330
1. Assert: _possibleEpochNs_ is not empty.
329331
1. Return _possibleEpochNs_[0].
@@ -332,6 +334,7 @@ <h1>
332334
1. Let _laterTime_ be AddTime(_isoDateTime_.[[Time]], _timeDuration_).
333335
1. Let _laterDate_ be AddDaysToISODate(_isoDateTime_.[[ISODate]], _laterTime_.[[Days]]).
334336
1. Let _laterDateTime_ be CombineISODateAndTimeRecord(_laterDate_, _laterTime_).
337+
1. Perform ? CheckISODaysRange(_laterDateTime_).
335338
1. Set _possibleEpochNs_ to ? GetPossibleEpochNanoseconds(_timeZone_, _laterDateTime_).
336339
1. Set _n_ to _possibleEpochNs_'s length.
337340
1. Assert: _n_ ≠ 0.
@@ -353,7 +356,7 @@ <h1>
353356
</dd>
354357
</dl>
355358
<emu-alg>
356-
1. Perform ? CheckISODaysRange(_isoDateTime_).
359+
1. Assert: ISODateTimeWithinLimits(_isoDateTime_) is *true*.
357360
1. Let _parseResult_ be ! ParseTimeZoneIdentifier(_timeZone_).
358361
1. If _parseResult_.[[OffsetMinutes]] is not ~empty~, then
359362
1. Let _offsetNanoseconds_ be _parseResult_.[[OffsetMinutes]] × 6 × 10<sup>10</sup>.
@@ -380,6 +383,7 @@ <h1>
380383
</dl>
381384
<emu-alg>
382385
1. Let _isoDateTime_ be CombineISODateAndTimeRecord(_isoDate_, MidnightTimeRecord()).
386+
1. Perform ? CheckISODaysRange(_isoDateTime_).
383387
1. Let _possibleEpochNs_ be ? GetPossibleEpochNanoseconds(_timeZone_, _isoDateTime_).
384388
1. If _possibleEpochNs_ is not empty, return _possibleEpochNs_[0].
385389
1. Assert: IsOffsetTimeZoneIdentifier(_timeZone_) is *false*.

0 commit comments

Comments
 (0)