Skip to content

Commit 77ee06c

Browse files
committed
Allow UNSET where necessary in validation
1 parent e42eea9 commit 77ee06c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

spec/duration.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ <h1>Temporal.Duration.prototype.round ( _roundTo_ )</h1>
409409
1. Let _roundingIncrement_ be ? GetRoundingIncrementOption(_roundTo_).
410410
1. Let _roundingMode_ be ? GetRoundingModeOption(_roundTo_, ~half-expand~).
411411
1. Let _smallestUnit_ be ? GetTemporalUnitValuedOption(_roundTo_, *"smallestUnit"*, ~unset~).
412-
1. Perform ? ValidateTemporalUnitValue(_largestUnit_, ~datetime~, « ~auto~ »).
413-
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~datetime~).
412+
1. Perform ? ValidateTemporalUnitValue(_largestUnit_, ~datetime~, « ~auto~, ~unset~ »).
413+
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~datetime~, « ~unset~ »).
414414
1. If _smallestUnit_ is ~unset~, then
415415
1. Set _smallestUnitPresent_ to *false*.
416416
1. Set _smallestUnit_ to ~nanosecond~.
@@ -516,7 +516,7 @@ <h1>Temporal.Duration.prototype.toString ( [ _options_ ] )</h1>
516516
1. Let _digits_ be ? GetTemporalFractionalSecondDigitsOption(_resolvedOptions_).
517517
1. Let _roundingMode_ be ? GetRoundingModeOption(_resolvedOptions_, ~trunc~).
518518
1. Let _smallestUnit_ be ? GetTemporalUnitValuedOption(_resolvedOptions_, *"smallestUnit"*, ~unset~).
519-
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~).
519+
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~, « ~unset~ »).
520520
1. If _smallestUnit_ is ~hour~ or ~minute~, throw a *RangeError* exception.
521521
1. Let _precision_ be ToSecondsStringPrecisionRecord(_smallestUnit_, _digits_).
522522
1. If _precision_.[[Unit]] is ~nanosecond~ and _precision_.[[Increment]] = 1, then

spec/instant.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ <h1>Temporal.Instant.prototype.toString ( [ _options_ ] )</h1>
238238
1. Let _roundingMode_ be ? GetRoundingModeOption(_resolvedOptions_, ~trunc~).
239239
1. Let _smallestUnit_ be ? GetTemporalUnitValuedOption(_resolvedOptions_, *"smallestUnit"*, ~unset~).
240240
1. Let _timeZone_ be ? Get(_resolvedOptions_, *"timeZone"*).
241-
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~).
241+
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~, « ~unset~ »).
242242
1. If _smallestUnit_ is ~hour~, throw a *RangeError* exception.
243243
1. If _timeZone_ is not *undefined*, then
244244
1. Set _timeZone_ to ? ToTemporalTimeZoneIdentifier(_timeZone_).

spec/plaindatetime.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ <h1>Temporal.PlainDateTime.prototype.toString ( [ _options_ ] )</h1>
543543
1. Let _digits_ be ? GetTemporalFractionalSecondDigitsOption(_resolvedOptions_).
544544
1. Let _roundingMode_ be ? GetRoundingModeOption(_resolvedOptions_, ~trunc~).
545545
1. Let _smallestUnit_ be ? GetTemporalUnitValuedOption(_resolvedOptions_, *"smallestUnit"*, ~unset~).
546-
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~).
546+
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~, « ~unset~ »).
547547
1. If _smallestUnit_ is ~hour~, throw a *RangeError* exception.
548548
1. Let _precision_ be ToSecondsStringPrecisionRecord(_smallestUnit_, _digits_).
549549
1. Let _result_ be RoundISODateTime(_plainDateTime_.[[ISODateTime]], _precision_.[[Increment]], _precision_.[[Unit]], _roundingMode_).

spec/plaintime.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ <h1>Temporal.PlainTime.prototype.toString ( [ _options_ ] )</h1>
305305
1. Let _digits_ be ? GetTemporalFractionalSecondDigitsOption(_resolvedOptions_).
306306
1. Let _roundingMode_ be ? GetRoundingModeOption(_resolvedOptions_, ~trunc~).
307307
1. Let _smallestUnit_ be ? GetTemporalUnitValuedOption(_resolvedOptions_, *"smallestUnit"*, ~unset~).
308-
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~).
308+
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~, « ~unset~ »).
309309
1. If _smallestUnit_ is ~hour~, throw a *RangeError* exception.
310310
1. Let _precision_ be ToSecondsStringPrecisionRecord(_smallestUnit_, _digits_).
311311
1. Let _roundResult_ be RoundTime(_plainTime_.[[Time]], _precision_.[[Increment]], _precision_.[[Unit]], _roundingMode_).

spec/zoneddatetime.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ <h1>Temporal.ZonedDateTime.prototype.toString ( [ _options_ ] )</h1>
695695
1. Let _roundingMode_ be ? GetRoundingModeOption(_resolvedOptions_, ~trunc~).
696696
1. Let _smallestUnit_ be ? GetTemporalUnitValuedOption(_resolvedOptions_, *"smallestUnit"*, ~unset~).
697697
1. Let _showTimeZone_ be ? GetTemporalShowTimeZoneNameOption(_resolvedOptions_).
698-
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~).
698+
1. Perform ? ValidateTemporalUnitValue(_smallestUnit_, ~time~, « ~unset~ »).
699699
1. If _smallestUnit_ is ~hour~, throw a *RangeError* exception.
700700
1. Let _precision_ be ToSecondsStringPrecisionRecord(_smallestUnit_, _digits_).
701701
1. Return TemporalZonedDateTimeToString(_zonedDateTime_, _precision_.[[Precision]], _showCalendar_, _showTimeZone_, _showOffset_, _precision_.[[Increment]], _precision_.[[Unit]], _roundingMode_).

0 commit comments

Comments
 (0)