Skip to content

Commit cd356a6

Browse files
anbaptomato
authored andcommitted
Editorial: CreateTemporalDate in AddDateTime is infallible
`AddDateTime` is only called with date-time components from a `Temporal.PlainDateTime` object, therefore the `CreateTemporalDate` call can't fail.
1 parent 09e9f9c commit cd356a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/plaindatetime.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,8 +1011,9 @@ <h1>
10111011
</dd>
10121012
</dl>
10131013
<emu-alg>
1014+
1. Assert: ISODateTimeWithinLimits(_year_, _month_, _day_, _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_) is *true*.
10141015
1. Let _timeResult_ be ! AddTime(_hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanosecond_, _hours_, _minutes_, _seconds_, _milliseconds_, _microseconds_, _nanoseconds_).
1015-
1. Let _datePart_ be ? CreateTemporalDate(_year_, _month_, _day_, _calendar_).
1016+
1. Let _datePart_ be ! CreateTemporalDate(_year_, _month_, _day_, _calendar_).
10161017
1. Let _dateDuration_ be ? CreateTemporalDuration(_years_, _months_, _weeks_, _days_ + _timeResult_.[[Days]], 0, 0, 0, 0, 0, 0).
10171018
1. Let _addedDate_ be ? CalendarDateAdd(_calendar_, _datePart_, _dateDuration_, _options_).
10181019
1. Return the Record {

0 commit comments

Comments
 (0)