Skip to content

Commit 91ec749

Browse files
committed
Editorial: Fix AOs that no longer return a [[NormalizedDuration]] field
Here are a couple of stragglers from PR #2943.
1 parent e6660f2 commit 91ec749

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

spec/plaindate.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -903,8 +903,7 @@ <h1>
903903
1. Let _isoDateTime_ be CombineISODateAndTimeRecord(_temporalDate_.[[ISODate]], MidnightTimeRecord()).
904904
1. Let _isoDateTimeOther_ be CombineISODateAndTimeRecord(_other_.[[ISODate]], MidnightTimeRecord()).
905905
1. Let _destEpochNs_ be GetUTCEpochNanoseconds(_isoDateTimeOther_).
906-
1. Let _result_ be ? RoundRelativeDuration(_duration_, _destEpochNs_, _isoDateTime_, ~unset~, _temporalDate_.[[Calendar]], _settings_.[[LargestUnit]], _settings_.[[RoundingIncrement]], _settings_.[[SmallestUnit]], _settings_.[[RoundingMode]]).
907-
1. Set _duration_ to _result_.[[NormalizedDuration]].
906+
1. Set _duration_ to ? RoundRelativeDuration(_duration_, _destEpochNs_, _isoDateTime_, ~unset~, _temporalDate_.[[Calendar]], _settings_.[[LargestUnit]], _settings_.[[RoundingIncrement]], _settings_.[[SmallestUnit]], _settings_.[[RoundingMode]]).
908907
1. Let _result_ be ! UnnormalizeDuration(_duration_, ~day~).
909908
1. If _operation_ is ~since~, set _result_ to CreateNegatedTemporalDuration(_result_).
910909
1. Return _result_.

spec/zoneddatetime.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1214,8 +1214,8 @@ <h1>
12141214
1. Let _resolvedOptions_ be ? GetOptionsObject(_options_).
12151215
1. Let _settings_ be ? GetDifferenceSettings(_operation_, _resolvedOptions_, ~datetime~, « », ~nanosecond~, ~hour~).
12161216
1. If TemporalUnitCategory(_settings_.[[LargestUnit]]) is not ~date~, then
1217-
1. Let _diffRecord_ be DifferenceInstant(_zonedDateTime_.[[EpochNanoseconds]], _other_.[[EpochNanoseconds]], _settings_.[[RoundingIncrement]], _settings_.[[SmallestUnit]], _settings_.[[RoundingMode]]).
1218-
1. Let _result_ be ! UnnormalizeDuration(_diffRecord_.[[NormalizedDuration]], _settings_.[[LargestUnit]]).
1217+
1. Let _internalDuration_ be DifferenceInstant(_zonedDateTime_.[[EpochNanoseconds]], _other_.[[EpochNanoseconds]], _settings_.[[RoundingIncrement]], _settings_.[[SmallestUnit]], _settings_.[[RoundingMode]]).
1218+
1. Let _result_ be ! UnnormalizeDuration(_internalDuration_, _settings_.[[LargestUnit]]).
12191219
1. If _operation_ is ~since~, set _result_ to CreateNegatedTemporalDuration(_result_).
12201220
1. Return _result_.
12211221
1. NOTE: To calculate differences in two different time zones, _settings_.[[LargestUnit]] must be a time unit, because day lengths can vary between time zones due to DST and other UTC offset shifts.

0 commit comments

Comments
 (0)