argument-string-calendar-annotation.js (801B)
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.zoneddatetime.from 7 description: Various forms of calendar annotation; critical flag has no effect 8 features: [Temporal] 9 ---*/ 10 11 const tests = [ 12 ["1970-01-01T00:00[UTC][u-ca=iso8601]", "without !"], 13 ["1970-01-01T00:00[UTC][!u-ca=iso8601]", "with !"], 14 ["1970-01-01T00:00[UTC][u-ca=iso8601][u-ca=discord]", "second annotation ignored"], 15 ]; 16 17 tests.forEach(([arg, description]) => { 18 const result = Temporal.ZonedDateTime.from(arg); 19 20 assert.sameValue(result.calendarId, "iso8601", `calendar annotation (${description})`); 21 }); 22 23 reportCompare(0, 0);