Skip to content

Commit 9a3477a

Browse files
ptomatoMs2ger
authored andcommitted
Editorial: Add clarifying assertion to BalanceDurationRelative
1 parent f666243 commit 9a3477a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/duration.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,8 @@ <h1>
13561356
</dl>
13571357
<emu-alg>
13581358
1. If _largestUnit_ is not one of *"year"*, *"month"*, or *"week"*, or _years_, _months_, _weeks_, and _days_ are all 0, then
1359-
1. Return ! CreateDateDurationRecord(_years_, _months_, _weeks_, _days_).
1359+
1. [id="step-balance-duration-relative-early-return"] Return ! CreateDateDurationRecord(_years_, _months_, _weeks_, _days_).
1360+
1. Assert: _relativeTo_ is not *undefined*, because callers of this operation ensure _relativeTo_ is required in conditions where this algorithm does not return in step <emu-xref href="#step-balance-duration-relative-early-return"></emu-xref>.
13601361
1. Let _sign_ be ! DurationSign(_years_, _months_, _weeks_, _days_, 0, 0, 0, 0, 0, 0).
13611362
1. Assert: _sign_ ≠ 0.
13621363
1. Let _oneYear_ be ! CreateTemporalDuration(_sign_, 0, 0, 0, 0, 0, 0, 0, 0, 0).

0 commit comments

Comments
 (0)