Skip to content

Commit 0bc5f9d

Browse files
anbaptomato
authored andcommitted
Editorial: Remove constant arguments from CalculateOffsetShift
1 parent 8d62569 commit 0bc5f9d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

spec/duration.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ <h1>Temporal.Duration.compare ( _one_, _two_ [ , _options_ ] )</h1>
9696
1. Set _two_ to ? ToTemporalDuration(_two_).
9797
1. Set _options_ to ? GetOptionsObject(_options_).
9898
1. Let _relativeTo_ be ? ToRelativeTemporalObject(_options_).
99-
1. Let _shift1_ be ? CalculateOffsetShift(_relativeTo_, _one_.[[Years]], _one_.[[Months]], _one_.[[Weeks]], _one_.[[Days]], 0, 0, 0, 0, 0, 0).
100-
1. Let _shift2_ be ? CalculateOffsetShift(_relativeTo_, _two_.[[Years]], _two_.[[Months]], _two_.[[Weeks]], _two_.[[Days]], 0, 0, 0, 0, 0, 0).
99+
1. Let _shift1_ be ? CalculateOffsetShift(_relativeTo_, _one_.[[Years]], _one_.[[Months]], _one_.[[Weeks]], _one_.[[Days]]).
100+
1. Let _shift2_ be ? CalculateOffsetShift(_relativeTo_, _two_.[[Years]], _two_.[[Months]], _two_.[[Weeks]], _two_.[[Days]]).
101101
1. If any of _one_.[[Years]], _two_.[[Years]], _one_.[[Months]], _two_.[[Months]], _one_.[[Weeks]], or _two_.[[Weeks]] are not 0, then
102102
1. Let _unbalanceResult1_ be ? UnbalanceDurationRelative(_one_.[[Years]], _one_.[[Months]], _one_.[[Weeks]], _one_.[[Days]], *"day"*, _relativeTo_).
103103
1. Let _unbalanceResult2_ be ? UnbalanceDurationRelative(_two_.[[Years]], _two_.[[Months]], _two_.[[Weeks]], _two_.[[Days]], *"day"*, _relativeTo_).
@@ -1117,12 +1117,6 @@ <h1>
11171117
_mon_: an integer,
11181118
_w_: an integer,
11191119
_d_: an integer,
1120-
_h_: an integer,
1121-
_min_: an integer,
1122-
_s_: an integer,
1123-
_ms_: an integer,
1124-
_mus_: an integer,
1125-
_ns_: an integer,
11261120
)
11271121
</h1>
11281122
<dl class="header">
@@ -1133,7 +1127,7 @@ <h1>
11331127
1. If Type(_relativeTo_) is not Object or _relativeTo_ does not have an [[InitializedTemporalZonedDateTime]] internal slot, return 0.
11341128
1. Let _instant_ be ! CreateTemporalInstant(_relativeTo_.[[Nanoseconds]]).
11351129
1. Let _offsetBefore_ be ? GetOffsetNanosecondsFor(_relativeTo_.[[TimeZone]], _instant_).
1136-
1. Let _after_ be ? AddZonedDateTime(_relativeTo_.[[Nanoseconds]], _relativeTo_.[[TimeZone]], _relativeTo_.[[Calendar]], _y_, _mon_, _w_, _d_, _h_, _min_, _s_, _ms_, _mus_, _ns_).
1130+
1. Let _after_ be ? AddZonedDateTime(_relativeTo_.[[Nanoseconds]], _relativeTo_.[[TimeZone]], _relativeTo_.[[Calendar]], _y_, _mon_, _w_, _d_, 0, 0, 0, 0, 0, 0).
11371131
1. Let _instantAfter_ be ! CreateTemporalInstant(_after_).
11381132
1. Let _offsetAfter_ be ? GetOffsetNanosecondsFor(_relativeTo_.[[TimeZone]], _instantAfter_).
11391133
1. Return _offsetAfter_ - _offsetBefore_.

0 commit comments

Comments
 (0)