From 406c8cc53aca414e4571903782d6a1abda7c70cd Mon Sep 17 00:00:00 2001 From: Frank Tang Date: Fri, 29 Apr 2022 14:22:18 -0700 Subject: [PATCH] sync pr/2162 --- spec/instant.html | 2 +- spec/plaindate.html | 6 +++--- spec/plaindatetime.html | 4 ++-- spec/plaintime.html | 6 +++--- spec/plainyearmonth.html | 6 +++--- spec/zoneddatetime.html | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spec/instant.html b/spec/instant.html index 19dda5c9f5..4b4fc64caa 100644 --- a/spec/instant.html +++ b/spec/instant.html @@ -643,7 +643,7 @@

1. Let _maximum_ be ! MaximumTemporalDurationRoundingIncrement(_smallestUnit_). 1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, _maximum_, *false*). 1. Let _roundedNs_ be ! DifferenceInstant(_first_.[[Nanoseconds]], _second_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_). - 1. Assert: The following steps cannot fail due to overflow in the Number domain because abs(_roundedNs_) ≤ 1.728 × 1022. + 1. Assert: The following steps cannot fail due to overflow in the Number domain because abs(_roundedNs_) ≤ 1.728 × 1022. 1. Let _result_ be ! BalanceDuration(0, 0, 0, 0, 0, 0, _roundedNs_, _largestUnit_). 1. Return ! CreateTemporalDuration(0, 0, 0, 0, _result_.[[Hours]], _result_.[[Minutes]], _result_.[[Seconds]], _result_.[[Milliseconds]], _result_.[[Microseconds]], _result_.[[Nanoseconds]]). diff --git a/spec/plaindate.html b/spec/plaindate.html index a5c85f4d12..49289c9f4a 100644 --- a/spec/plaindate.html +++ b/spec/plaindate.html @@ -896,7 +896,7 @@

CompareISODate ( _y1_, _m1_, _d1_, _y2_, _m2_, _d2_ )

DifferenceTemporalPlainDate ( - _direction_: an integer, 1 or -1, + _direction_: 1 or -1, _temporalDate_: a Temporal.PlainDate, _other_: an ECMAScript language value, _options_: an Object or *undefined*, @@ -917,9 +917,9 @@

1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, *undefined*, *false*). 1. Let _untilOptions_ be ? MergeLargestUnitOption(_options_, _largestUnit_). 1. Let _result_ be ? CalendarDateUntil(_temporalDate_.[[Calendar]], _temporalDate_, _other_, _untilOptions_). - 1. If _smallestUnit_ is not *"day"* or _roundingIncrement_ ≠ 1, then + 1. If _smallestUnit_ is not *"day"* or _roundingIncrement_ ≠ 1, then 1. Set _result_ to (? RoundDuration(_result_.[[Years]], _result_.[[Months]], _result_.[[Weeks]], _result_.[[Days]], 0, 0, 0, 0, 0, 0, _roundingIncrement_, _smallestUnit_, _roundingMode_, _temporalDate_)).[[DurationRecord]]. - 1. Return ! CreateTemporalDuration(_direction_ × _result_.[[Years]], _direction_ × _result_.[[Months]], _direction_ × _result_.[[Weeks]], _direction_ × _result_.[[Days]], 0, 0, 0, 0, 0, 0). + 1. Return ! CreateTemporalDuration(_direction_ × _result_.[[Years]], _direction_ × _result_.[[Months]], _direction_ × _result_.[[Weeks]], _direction_ × _result_.[[Days]], 0, 0, 0, 0, 0, 0). diff --git a/spec/plaindatetime.html b/spec/plaindatetime.html index 93575ad99c..770beb3965 100644 --- a/spec/plaindatetime.html +++ b/spec/plaindatetime.html @@ -1131,7 +1131,7 @@

DifferenceTemporalPlainDateTime ( - _direction_: an integer, 1 or -1, + _direction_: 1 or -1, _dateTime_: a Temporal.PlainDateTime, _other_: an ECMAScript language value, _options_: an Object or *undefined*, @@ -1154,7 +1154,7 @@

1. Let _relativeTo_ be ! CreateTemporalDate(_dateTime_.[[ISOYear]], _dateTime_.[[ISOMonth]], _dateTime_.[[ISODay]], _dateTime_.[[Calendar]]). 1. Let _roundResult_ be (? RoundDuration(_diff_.[[Years]], _diff_.[[Months]], _diff_.[[Weeks]], _diff_.[[Days]], _diff_.[[Hours]], _diff_.[[Minutes]], _diff_.[[Seconds]], _diff_.[[Milliseconds]], _diff_.[[Microseconds]], _diff_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_, _relativeTo_)).[[DurationRecord]]. 1. Let _result_ be ? BalanceDuration(_roundResult_.[[Days]], _roundResult_.[[Hours]], _roundResult_.[[Minutes]], _roundResult_.[[Seconds]], _roundResult_.[[Milliseconds]], _roundResult_.[[Microseconds]], _roundResult_.[[Nanoseconds]], _largestUnit_). - 1. Return ! CreateTemporalDuration(_direction_ × _roundResult_.[[Years]], _direction_ × _roundResult_.[[Months]], _direction_ × _roundResult_.[[Weeks]], _direction_ × _result_.[[Days]], _direction_ × _result_.[[Hours]], _direction_ × _result_.[[Minutes]], _direction_ × _result_.[[Seconds]], _direction_ × _result_.[[Milliseconds]], _direction_ × _result_.[[Microseconds]], _direction_ × _result_.[[Nanoseconds]]). + 1. Return ! CreateTemporalDuration(_direction_ × _roundResult_.[[Years]], _direction_ × _roundResult_.[[Months]], _direction_ × _roundResult_.[[Weeks]], _direction_ × _result_.[[Days]], _direction_ × _result_.[[Hours]], _direction_ × _result_.[[Minutes]], _direction_ × _result_.[[Seconds]], _direction_ × _result_.[[Milliseconds]], _direction_ × _result_.[[Microseconds]], _direction_ × _result_.[[Nanoseconds]]). diff --git a/spec/plaintime.html b/spec/plaintime.html index b76cd02ff4..427415446f 100644 --- a/spec/plaintime.html +++ b/spec/plaintime.html @@ -943,7 +943,7 @@

RoundTime ( _hour_, _minute_, _second_, _millisecond_, _microsecond_, _nanos

DifferenceTemporalPlainTime ( - _direction_: an integer, 1 or -1, + _direction_: 1 or -1, _temporalTime_: a Temporal.PlainTime, _other_: an ECMAScript language value, _options_: an Object or *undefined*, @@ -961,8 +961,8 @@

1. Let _maximum_ be ! MaximumTemporalDurationRoundingIncrement(_smallestUnit_). 1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, _maximum_, *false*). 1. Let _result_ be ! DifferenceTime(_other_.[[ISOHour]], _other_.[[ISOMinute]], _other_.[[ISOSecond]], _other_.[[ISOMillisecond]], _other_.[[ISOMicrosecond]], _other_.[[ISONanosecond]], _temporalTime_.[[ISOHour]], _temporalTime_.[[ISOMinute]], _temporalTime_.[[ISOSecond]], _temporalTime_.[[ISOMillisecond]], _temporalTime_.[[ISOMicrosecond]], _temporalTime_.[[ISONanosecond]]). - 1. Set _result_ to (? RoundDuration(0, 0, 0, 0, _direction_ × _result_.[[Hours]], _direction_ × _result_.[[Minutes]], _direction_ × _result_.[[Seconds]], _direction_ × _result_.[[Milliseconds]], _direction_ × _result_.[[Microseconds]], _direction_ × _result_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_)).[[DurationRecord]]. - 1. Set _result_ to ? BalanceDuration(0, _direction_ × _result_.[[Hours]], _direction_ × _result_.[[Minutes]], _direction_ × _result_.[[Seconds]], _direction_ × _result_.[[Milliseconds]], _direction_ × _result_.[[Microseconds]], _direction_ × _result_.[[Nanoseconds]], _largestUnit_). + 1. Set _result_ to (? RoundDuration(0, 0, 0, 0, _direction_ × _result_.[[Hours]], _direction_ × _result_.[[Minutes]], _direction_ × _result_.[[Seconds]], _direction_ × _result_.[[Milliseconds]], _direction_ × _result_.[[Microseconds]], _direction_ × _result_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_)).[[DurationRecord]]. + 1. Set _result_ to ? BalanceDuration(0, _direction_ × _result_.[[Hours]], _direction_ × _result_.[[Minutes]], _direction_ × _result_.[[Seconds]], _direction_ × _result_.[[Milliseconds]], _direction_ × _result_.[[Microseconds]], _direction_ × _result_.[[Nanoseconds]], _largestUnit_). 1. Return ! CreateTemporalDuration(0, 0, 0, 0, _result_.[[Hours]], _result_.[[Minutes]], _result_.[[Seconds]], _result_.[[Milliseconds]], _result_.[[Microseconds]], _result_.[[Nanoseconds]]). diff --git a/spec/plainyearmonth.html b/spec/plainyearmonth.html index 108518402d..0c8054fdbc 100644 --- a/spec/plainyearmonth.html +++ b/spec/plainyearmonth.html @@ -655,7 +655,7 @@

TemporalYearMonthToString ( _yearMonth_, _showCalendar_ )

DifferenceTemporalPlainYearMonth ( - _direction_: an integer, 1 or -1, + _direction_: 1 or -1, _yearMonth_: a Temporal.PlainYearMonth, _other_: an ECMAScript language value, _options_: an Object or *undefined*, @@ -683,9 +683,9 @@

1. Let _thisDate_ be ? CalendarDateFromFields(_calendar_, _thisFields_). 1. Let _untilOptions_ be ? MergeLargestUnitOption(_options_, _largestUnit_). 1. Let _result_ be ? CalendarDateUntil(_calendar_, _thisDate_, _otherDate_, _untilOptions_). - 1. If _smallestUnit_ is not *"month"* or _roundingIncrement_ ≠ 1, then + 1. If _smallestUnit_ is not *"month"* or _roundingIncrement_ ≠ 1, then 1. Let _result_ be (? RoundDuration(_result_.[[Years]], _result_.[[Months]], 0, 0, 0, 0, 0, 0, 0, 0, _roundingIncrement_, _smallestUnit_, _roundingMode_, _thisDate_)).[[DurationRecord]]. - 1. Return ! CreateTemporalDuration(_direction_ × _result_.[[Years]], _direction_ × _result_.[[Months]], 0, 0, 0, 0, 0, 0, 0, 0). + 1. Return ! CreateTemporalDuration(_direction_ × _result_.[[Years]], _direction_ × _result_.[[Months]], 0, 0, 0, 0, 0, 0, 0, 0). diff --git a/spec/zoneddatetime.html b/spec/zoneddatetime.html index 6a779c37db..662f83dbda 100644 --- a/spec/zoneddatetime.html +++ b/spec/zoneddatetime.html @@ -1357,7 +1357,7 @@

DifferenceTemporalZonedDateTime ( - _direction_: an integer, 1 or -1, + _direction_: 1 or -1, _zonedDateTime_: a Temporal.ZonedDateTime, _other_: an ECMAScript language value, _options_: an Object or *undefined*, @@ -1379,16 +1379,16 @@

1. Let _roundingIncrement_ be ? ToTemporalRoundingIncrement(_options_, _maximum_, *false*). 1. If _largestUnit_ is not one of *"year"*, *"month"*, *"week"*, or *"day"*, then 1. Let _differenceNs_ be ! DifferenceInstant(_zonedDateTime_.[[Nanoseconds]], _other_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_). - 1. Assert: The following steps cannot fail due to overflow in the Number domain because abs(_differenceNs_) ≤ 1.728 × 1022. + 1. Assert: The following steps cannot fail due to overflow in the Number domain because abs(_differenceNs_) ≤ 1.728 × 1022. 1. Let _balanceResult_ be ! BalanceDuration(0, 0, 0, 0, 0, 0, _differenceNs_, _largestUnit_). - 1. Return ! CreateTemporalDuration(0, 0, 0, 0, _direction_ × _balanceResult_.[[Hours]], _direction_ × _balanceResult_.[[Minutes]], _direction_ × _balanceResult_.[[Seconds]], _direction_ × _balanceResult_.[[Milliseconds]], _direction_ × _balanceResult_.[[Microseconds]], _direction_ × _balanceResult_.[[Nanoseconds]]). + 1. Return ! CreateTemporalDuration(0, 0, 0, 0, _direction_ × _balanceResult_.[[Hours]], _direction_ × _balanceResult_.[[Minutes]], _direction_ × _balanceResult_.[[Seconds]], _direction_ × _balanceResult_.[[Milliseconds]], _direction_ × _balanceResult_.[[Microseconds]], _direction_ × _balanceResult_.[[Nanoseconds]]). 1. If ? TimeZoneEquals(_zonedDateTime_.[[TimeZone]], _other_.[[TimeZone]]) is *false*, then 1. Throw a *RangeError* exception. 1. Let _untilOptions_ be ? MergeLargestUnitOption(_options_, _largestUnit_). 1. Let _difference_ be ? DifferenceZonedDateTime(_zonedDateTime_.[[Nanoseconds]], _other_.[[Nanoseconds]], _zonedDateTime_.[[TimeZone]], _zonedDateTime_.[[Calendar]], _largestUnit_, _untilOptions_). 1. Let _roundResult_ be (? RoundDuration(_difference_.[[Years]], _difference_.[[Months]], _difference_.[[Weeks]], _difference_.[[Days]], _difference_.[[Hours]], _difference_.[[Minutes]], _difference_.[[Seconds]], _difference_.[[Milliseconds]], _difference_.[[Microseconds]], _difference_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_, _zonedDateTime_)).[[DurationRecord]]. 1. Let _result_ be ? AdjustRoundedDurationDays(_roundResult_.[[Years]], _roundResult_.[[Months]], _roundResult_.[[Weeks]], _roundResult_.[[Days]], _roundResult_.[[Hours]], _roundResult_.[[Minutes]], _roundResult_.[[Seconds]], _roundResult_.[[Milliseconds]], _roundResult_.[[Microseconds]], _roundResult_.[[Nanoseconds]], _roundingIncrement_, _smallestUnit_, _roundingMode_, _zonedDateTime_). - 1. Return ! CreateTemporalDuration(_direction_ × _result_.[[Years]], _direction_ × _result_.[[Months]], _direction_ × _result_.[[Weeks]], _direction_ × _result_.[[Days]], _direction_ × _result_.[[Hours]], _direction_ × _result_.[[Minutes]], _direction_ × _result_.[[Seconds]], _direction_ × _result_.[[Milliseconds]], _direction_ × _result_.[[Microseconds]], _direction_ × _result_.[[Nanoseconds]]). + 1. Return ! CreateTemporalDuration(_direction_ × _result_.[[Years]], _direction_ × _result_.[[Months]], _direction_ × _result_.[[Weeks]], _direction_ × _result_.[[Days]], _direction_ × _result_.[[Hours]], _direction_ × _result_.[[Minutes]], _direction_ × _result_.[[Seconds]], _direction_ × _result_.[[Milliseconds]], _direction_ × _result_.[[Microseconds]], _direction_ × _result_.[[Nanoseconds]]).