Skip to content

Commit 208e117

Browse files
sffcptomato
authored andcommitted
Normative: Delay validation of unit-valued options
1 parent 07c924b commit 208e117

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/instant.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ <h1>Temporal.Instant.prototype.toString ( [ _options_ ] )</h1>
237237
1. Let _digits_ be ? GetTemporalFractionalSecondDigitsOption(_resolvedOptions_).
238238
1. Let _roundingMode_ be ? GetRoundingModeOption(_resolvedOptions_, ~trunc~).
239239
1. Let _smallestUnit_ be ? GetTemporalUnitValuedOption(_resolvedOptions_, *"smallestUnit"*, ~unset~).
240+
1. Let _timeZone_ be ? Get(_resolvedOptions_, *"timeZone"*).
240241
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~).
241242
1. If _smallestUnit_ is ~hour~, throw a *RangeError* exception.
242-
1. Let _timeZone_ be ? Get(_resolvedOptions_, *"timeZone"*).
243243
1. If _timeZone_ is not *undefined*, then
244244
1. Set _timeZone_ to ? ToTemporalTimeZoneIdentifier(_timeZone_).
245245
1. Let _precision_ be ToSecondsStringPrecisionRecord(_smallestUnit_, _digits_).

spec/zoneddatetime.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,9 @@ <h1>Temporal.ZonedDateTime.prototype.toString ( [ _options_ ] )</h1>
694694
1. Let _showOffset_ be ? GetTemporalShowOffsetOption(_resolvedOptions_).
695695
1. Let _roundingMode_ be ? GetRoundingModeOption(_resolvedOptions_, ~trunc~).
696696
1. Let _smallestUnit_ be ? GetTemporalUnitValuedOption(_resolvedOptions_, *"smallestUnit"*, ~unset~).
697+
1. Let _showTimeZone_ be ? GetTemporalShowTimeZoneNameOption(_resolvedOptions_).
697698
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~).
698699
1. If _smallestUnit_ is ~hour~, throw a *RangeError* exception.
699-
1. Let _showTimeZone_ be ? GetTemporalShowTimeZoneNameOption(_resolvedOptions_).
700700
1. Let _precision_ be ToSecondsStringPrecisionRecord(_smallestUnit_, _digits_).
701701
1. Return TemporalZonedDateTimeToString(_zonedDateTime_, _precision_.[[Precision]], _showCalendar_, _showTimeZone_, _showOffset_, _precision_.[[Increment]], _precision_.[[Unit]], _roundingMode_).
702702
</emu-alg>

0 commit comments

Comments
 (0)