argument-string-optional-data.js (932B)
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.plaindatetime.from 7 description: Some parts of a string argument may be omitted 8 features: [Temporal] 9 includes: [temporalHelpers.js] 10 ---*/ 11 12 TemporalHelpers.assertPlainDateTime( 13 Temporal.PlainDateTime.from("1976-11-18T15:23:30+00"), 14 1976, 11, "M11", 18, 15, 23, 30, 0, 0, 0, 15 "optional parts (no minute after offset)" 16 ); 17 18 TemporalHelpers.assertPlainDateTime( 19 Temporal.PlainDateTime.from("1976-11-18T15"), 20 1976, 11, "M11", 18, 15, 0, 0, 0, 0, 0, 21 "optional parts (no minute in time part)" 22 ); 23 24 TemporalHelpers.assertPlainDateTime( 25 Temporal.PlainDateTime.from("1976-11-18"), 26 1976, 11, "M11", 18, 0, 0, 0, 0, 0, 0, 27 "optional parts (no time part)" 28 ); 29 30 reportCompare(0, 0);