Skip to content

Commit 4b0246a

Browse files
ptomatoMs2ger
authored andcommitted
Editorial: Rename GetIANATimeZoneNextTransition to GetNamedTimeZoneNextTransition
This rename, as well as the reordering of the two arguments, is for consistency with now-existing ECMA-262 operations such as GetNamedTimeZoneEpochNanoseconds.
1 parent e1efe59 commit 4b0246a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

polyfill/lib/ecmascript.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2240,7 +2240,7 @@ export const ES = ObjectAssign({}, ES2022, {
22402240
const { year, month, day, hour, minute, second } = ES.GetFormatterParts(id, epochMilliseconds);
22412241
return ES.BalanceISODateTime(year, month, day, hour, minute, second, millisecond, microsecond, nanosecond);
22422242
},
2243-
GetIANATimeZoneNextTransition: (epochNanoseconds, id) => {
2243+
GetNamedTimeZoneNextTransition: (id, epochNanoseconds) => {
22442244
const uppercap = ES.SystemUTCEpochNanoSeconds().plus(DAY_NANOS.multiply(366));
22452245
let leftNanos = epochNanoseconds;
22462246
let leftOffsetNs = ES.GetNamedTimeZoneOffsetNanoseconds(id, leftNanos);

polyfill/lib/timezone.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class TimeZone {
122122

123123
let epochNanoseconds = GetSlot(startingPoint, EPOCHNANOSECONDS);
124124
const Instant = GetIntrinsic('%Temporal.Instant%');
125-
epochNanoseconds = ES.GetIANATimeZoneNextTransition(epochNanoseconds, id);
125+
epochNanoseconds = ES.GetNamedTimeZoneNextTransition(id, epochNanoseconds);
126126
return epochNanoseconds === null ? null : new Instant(epochNanoseconds);
127127
}
128128
getPreviousTransition(startingPoint) {

spec/timezone.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ <h1>Temporal.TimeZone.prototype.getNextTransition ( _startingPoint_ )</h1>
271271
1. Perform ? RequireInternalSlot(_timeZone_, [[InitializedTemporalTimeZone]]).
272272
1. Set _startingPoint_ to ? ToTemporalInstant(_startingPoint_).
273273
1. If _timeZone_.[[OffsetNanoseconds]] is not *undefined*, return *null*.
274-
1. Let _transition_ be GetIANATimeZoneNextTransition(_startingPoint_.[[Nanoseconds]], _timeZone_.[[Identifier]]).
274+
1. Let _transition_ be GetNamedTimeZoneNextTransition(_timeZone_.[[Identifier]], _startingPoint_.[[Nanoseconds]]).
275275
1. If _transition_ is *null*, return *null*.
276276
1. Return ! CreateTemporalInstant(_transition_).
277277
</emu-alg>
@@ -424,9 +424,9 @@ <h1>
424424

425425
<emu-clause id="sec-temporal-getianatimezonenexttransition" type="implementation-defined abstract operation">
426426
<h1>
427-
GetIANATimeZoneNextTransition (
428-
_epochNanoseconds_: a BigInt,
427+
GetNamedTimeZoneNextTransition (
429428
_timeZoneIdentifier_: a String,
429+
_epochNanoseconds_: a BigInt,
430430
): a BigInt or *null*
431431
</h1>
432432
<dl class="header">
@@ -436,7 +436,7 @@ <h1>
436436
The operation returns *null* if no such transition exists for which _t_ &le; ℤ(nsMaxInstant).
437437
</p>
438438
<p>
439-
Given the same values of _epochNanoseconds_ and _timeZoneIdentifier_, the result must be the same for the lifetime of the surrounding agent.
439+
Given the same values of _timeZoneIdentifier_ and _epochNanoseconds_, the result must be the same for the lifetime of the surrounding agent.
440440
</p>
441441
</emu-clause>
442442

0 commit comments

Comments
 (0)