blob: 25b517f90a88c4bb9d96d287ddaac4a80ed3907c [file] [log] [blame]
// Copyright (C) 2021 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.timezone.prototype.getprevioustransition
description: Fast path for converting Temporal.ZonedDateTime to Temporal.Instant
info: |
sec-temporal.timezone.prototype.getprevioustransition step 3:
3. Set _startingPoint_ to ? ToTemporalInstant(_startingPoint_).
sec-temporal-totemporalinstant step 1.b:
b. If _item_ has an [[InitializedTemporalZonedDateTime]] internal slot, then
i. Return ! CreateTemporalInstant(_item_.[[Nanoseconds]]).
includes: [compareArray.js, temporalHelpers.js]
features: [Temporal]
---*/
TemporalHelpers.checkToTemporalInstantFastPath((datetime) => {
const timeZone = Temporal.TimeZone.from("UTC");
const result = timeZone.getPreviousTransition(datetime);
assert.sameValue(result, null, "transition result");
});