mirror of
https://github.com/tc39/test262.git
synced 2025-07-12 08:34:41 +02:00
Tests for the normative changes made to Temporal in https://github.com/tc39/proposal-temporal/pull/1796
14 lines
513 B
JavaScript
14 lines
513 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.instant.from
|
|
description: Instant strings with UTC offset fractional part are not confused with time fractional part
|
|
features: [Temporal]
|
|
---*/
|
|
|
|
const str = "1970-01-01T00:02:00.000000000+00:02[+00:01:30.987654321]";
|
|
|
|
const result = Temporal.Instant.from(str);
|
|
assert.sameValue(result.epochNanoseconds, 0n, "UTC offset determined from offset part of string");
|