mirror of
https://github.com/tc39/test262.git
synced 2025-09-28 04:28:42 +02:00
Previously, "nested" time zone property bags were unwrapped up to one level. That is, this object: { timeZone: { // ...Temporal.TimeZone methods } } would not be considered to implement the TimeZone protocol, but would have its timeZone property used instead, if it were passed to an API that required a TimeZone protocol object. These nested property bags are no longer supported. Discussion: https://github.com/tc39/proposal-temporal/issues/2104#issuecomment-1409549753 Corresponding normative PR: https://github.com/tc39/proposal-temporal/pull/2485
14 lines
551 B
JavaScript
14 lines
551 B
JavaScript
// 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.now.zoneddatetimeiso
|
|
description: Time zone strings with UTC offset fractional part are not confused with time fractional part
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
const timeZone = "2021-08-19T17:30:45.123456789+01:46[+01:45:30.987654321]";
|
|
|
|
const result = Temporal.Now.zonedDateTimeISO(timeZone);
|
|
assert.sameValue(result.timeZoneId, "+01:45:30.987654321", "Time zone string determined from bracket name");
|