roundtrip-from-string.js (845B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 2 // Copyright (C) 2025 Igalia, S.L. All rights reserved. 3 // This code is governed by the BSD license found in the LICENSE file. 4 5 /*--- 6 esid: sec-temporal.plaindatetime.from 7 description: > 8 Check that various dates created from a RFC 9557 string have the expected 9 properties 10 includes: [temporalHelpers.js] 11 features: [Temporal, Intl.Era-monthcode] 12 ---*/ 13 14 TemporalHelpers.assertPlainDateTime( 15 Temporal.PlainDateTime.from("2000-01-01T12:34:56.987654321"), 16 2000, 1, "M01", 1, 12, 34, 56, 987, 654, 321, 17 "created from string 2000-01-01"); 18 19 TemporalHelpers.assertPlainDateTime( 20 Temporal.PlainDateTime.from("0001-01-01T12:34:56.987654321"), 21 1, 1, "M01", 1, 12, 34, 56, 987, 654, 321, 22 "created from string 0001-01-01"); 23 24 reportCompare(0, 0);