Skip to content

Commit 58ee13f

Browse files
committed
Editorial: Move CheckISODaysRange from GetPossibleEpochNanoseconds to callers
1 parent c0f30a4 commit 58ee13f

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>
@@ -320,6 +321,7 @@ <h1>
320321
1. Let _earlierTime_ be AddTime(_isoDateTime_.[[Time]], _timeDuration_).
321322
1. Let _earlierDate_ be AddDaysToISODate(_isoDateTime_.[[ISODate]], _earlierTime_.[[Days]]).
322323
1. Let _earlierDateTime_ be CombineISODateAndTimeRecord(_earlierDate_, _earlierTime_).
324+
1. Perform ? CheckISODaysRange(_earlierDateTime_).
323325
1. Set _possibleEpochNs_ to ? GetPossibleEpochNanoseconds(_timeZone_, _earlierDateTime_).
324326
1. Assert: _possibleEpochNs_ is not empty.
325327
1. Return _possibleEpochNs_[0].
@@ -328,6 +330,7 @@ <h1>
328330
1. Let _laterTime_ be AddTime(_isoDateTime_.[[Time]], _timeDuration_).
329331
1. Let _laterDate_ be AddDaysToISODate(_isoDateTime_.[[ISODate]], _laterTime_.[[Days]]).
330332
1. Let _laterDateTime_ be CombineISODateAndTimeRecord(_laterDate_, _laterTime_).
333+
1. Perform ? CheckISODaysRange(_laterDateTime_).
331334
1. Set _possibleEpochNs_ to ? GetPossibleEpochNanoseconds(_timeZone_, _laterDateTime_).
332335
1. Set _n_ to _possibleEpochNs_'s length.
333336
1. Assert: _n_ ≠ 0.
@@ -349,7 +352,7 @@ <h1>
349352
</dd>
350353
</dl>
351354
<emu-alg>
352-
1. Perform ? CheckISODaysRange(_isoDateTime_).
355+
1. Assert: ISODateTimeWithinLimits(_isoDateTime_) is *true*.
353356
1. Let _parseResult_ be ! ParseTimeZoneIdentifier(_timeZone_).
354357
1. If _parseResult_.[[OffsetMinutes]] is not ~empty~, then
355358
1. Let _offsetNanoseconds_ be _parseResult_.[[OffsetMinutes]] × 6 × 10<sup>10</sup>.
@@ -376,6 +379,7 @@ <h1>
376379
</dl>
377380
<emu-alg>
378381
1. Let _isoDateTime_ be CombineISODateAndTimeRecord(_isoDate_, MidnightTimeRecord()).
382+
1. Perform ? CheckISODaysRange(_isoDateTime_).
379383
1. Let _possibleEpochNs_ be ? GetPossibleEpochNanoseconds(_timeZone_, _isoDateTime_).
380384
1. If _possibleEpochNs_ is not empty, return _possibleEpochNs_[0].
381385
1. Assert: IsOffsetTimeZoneIdentifier(_timeZone_) is *false*.

0 commit comments

Comments
 (0)