argument-string-leap-second.js (825B)
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally 2 // Copyright (C) 2022 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.plaintime.from 7 description: Leap second is replaced by :59 in ISO strings. 8 includes: [temporalHelpers.js] 9 features: [Temporal] 10 ---*/ 11 12 for (const options of [undefined, {}, { overflow: "constrain" }, { overflow: "reject" }]) { 13 TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("23:59:60", options), 14 23, 59, 59, 0, 0, 0); 15 TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("12:30:60", options), 16 12, 30, 59, 0, 0, 0); 17 TemporalHelpers.assertPlainTime(Temporal.PlainTime.from("23:59:60.170", options), 18 23, 59, 59, 170, 0, 0); 19 } 20 21 reportCompare(0, 0);