Skip to content

Commit 6b12d09

Browse files
committed
Editorial: Move CheckISODaysRange to the top
1 parent ef8fada commit 6b12d09

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

spec/timezone.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,13 @@ <h1>
347347
</dd>
348348
</dl>
349349
<emu-alg>
350+
1. Perform ? CheckISODaysRange(_isoDateTime_.[[ISODate]]).
350351
1. Let _parseResult_ be ! ParseTimeZoneIdentifier(_timeZone_).
351352
1. If _parseResult_.[[OffsetMinutes]] is not ~empty~, then
352353
1. Let _offsetNanoseconds_ be _parseResult_.[[OffsetMinutes]] × 6 × 10<sup>10</sup>.
353-
1. Perform ? CheckISODaysRange(_isoDateTime_.[[ISODate]]).
354354
1. Let _epochNanoseconds_ be GetUTCEpochNanoseconds(_isoDateTime_) - _offsetNanoseconds_.
355355
1. Let _possibleEpochNanoseconds_ be « _epochNanoseconds_ ».
356356
1. Else,
357-
1. Perform ? CheckISODaysRange(_isoDateTime_.[[ISODate]]).
358357
1. Let _possibleEpochNanoseconds_ be GetNamedTimeZoneEpochNanoseconds(_parseResult_.[[Name]], _isoDateTime_).
359358
1. For each value _epochNanoseconds_ in _possibleEpochNanoseconds_, do
360359
1. If IsValidEpochNanoseconds(_epochNanoseconds_) is *false*, throw a *RangeError* exception.

spec/zoneddatetime.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ <h1>
907907
</dd>
908908
</dl>
909909
<emu-alg>
910+
1. Perform ? CheckISODaysRange(_isoDate_).
910911
1. If _time_ is ~start-of-day~, then
911912
1. Assert: _offsetBehaviour_ is ~wall~.
912913
1. Assert: _offsetNanoseconds_ is 0.
@@ -915,13 +916,11 @@ <h1>
915916
1. If _offsetBehaviour_ is ~wall~, or _offsetBehaviour_ is ~option~ and _offsetOption_ is ~ignore~, then
916917
1. Return ? GetEpochNanosecondsFor(_timeZone_, _isoDateTime_, _disambiguation_).
917918
1. If _offsetBehaviour_ is ~exact~, or _offsetBehaviour_ is ~option~ and _offsetOption_ is ~use~, then
918-
1. Perform ? CheckISODaysRange(_isoDate_).
919919
1. Let _epochNanoseconds_ be GetUTCEpochNanoseconds(_isoDateTime_) - _offsetNanoseconds_.
920920
1. If IsValidEpochNanoseconds(_epochNanoseconds_) is *false*, throw a *RangeError* exception.
921921
1. Return _epochNanoseconds_.
922922
1. Assert: _offsetBehaviour_ is ~option~.
923923
1. Assert: _offsetOption_ is ~prefer~ or ~reject~.
924-
1. Perform ? CheckISODaysRange(_isoDate_).
925924
1. Let _utcEpochNanoseconds_ be GetUTCEpochNanoseconds(_isoDateTime_).
926925
1. Let _possibleEpochNs_ be ? GetPossibleEpochNanoseconds(_timeZone_, _isoDateTime_).
927926
1. For each element _candidate_ of _possibleEpochNs_, do

0 commit comments

Comments
 (0)