Skip to content

Commit 6860ad1

Browse files
ptomatoMs2ger
authored andcommitted
Editorial: CombineDateAndTimeDuration in DifferenceZonedDateTime is infallible
dateDifference and timeDuration cannot have opposite signs here, so the operation can't fail. This is ensured by the loop above, which backs up the intermediate date by one day until the signs match, which is asserted after the loop exits in step 11. See: #3023
1 parent 034f756 commit 6860ad1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/zoneddatetime.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ <h1>
11391139
1. Assert: _success_ is *true*.
11401140
1. Let _dateLargestUnit_ be LargerOfTwoTemporalUnits(_largestUnit_, ~day~).
11411141
1. Let _dateDifference_ be CalendarDateUntil(_calendar_, _startDateTime_.[[ISODate]], _intermediateDateTime_.[[ISODate]], _dateLargestUnit_).
1142-
1. Return ? CombineDateAndTimeDuration(_dateDifference_, _timeDuration_).
1142+
1. Return ! CombineDateAndTimeDuration(_dateDifference_, _timeDuration_).
11431143
</emu-alg>
11441144
</emu-clause>
11451145

0 commit comments

Comments
 (0)