Skip to content

Commit 76dc52f

Browse files
ptomatoMs2ger
authored andcommitted
Editorial: CombineDateAndTimeDuration in NudgeToZonedTime is infallible
dateDuration and roundedTimeDuration cannot have opposite signs, so the operation can't throw. dateDuration must have the same sign as duration, because dayDelta either is 0 or also has the same sign as duration. roundedTimeDuration must have the same sign as duration or be 0, because either it is rounded from duration in step 10, or it is rounded from beyondDaySpan in step 12.c. beyondDaySpan also cannot have the opposite sign as duration if we go into the substeps of step 12. See: #3023
1 parent 630b043 commit 76dc52f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/duration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@ <h1>
16951695
1. Let _dayDelta_ be 0.
16961696
1. Let _nudgedEpochNs_ be AddTimeDurationToEpochNanoseconds(_roundedTimeDuration_, _startEpochNs_).
16971697
1. Let _dateDuration_ be ! AdjustDateDurationRecord(_duration_.[[Date]], _duration_.[[Date]].[[Days]] + _dayDelta_).
1698-
1. Let _resultDuration_ be ? CombineDateAndTimeDuration(_dateDuration_, _roundedTimeDuration_).
1698+
1. Let _resultDuration_ be ! CombineDateAndTimeDuration(_dateDuration_, _roundedTimeDuration_).
16991699
1. Return Duration Nudge Result Record { [[Duration]]: _resultDuration_, [[NudgedEpochNs]]: _nudgedEpochNs_, [[DidExpandCalendarUnit]]: _didRoundBeyondDay_ }.
17001700
</emu-alg>
17011701
</emu-clause>

0 commit comments

Comments
 (0)