argument-string-calendar-annotation.js (950B)
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.plainyearmonth.compare 7 description: Various forms of calendar annotation; critical flag has no effect 8 features: [Temporal] 9 ---*/ 10 11 const tests = [ 12 ["2019-12-15T15:23[u-ca=iso8601]", "without time zone"], 13 ["2019-12-15T15:23[UTC][u-ca=iso8601]", "with time zone"], 14 ["2019-12-15T15:23[!u-ca=iso8601]", "with ! and no time zone"], 15 ["2019-12-15T15:23[UTC][!u-ca=iso8601]", "with ! and time zone"], 16 ["2019-12-15T15:23[u-ca=iso8601][u-ca=discord]", "second annotation ignored"], 17 ]; 18 19 tests.forEach(([arg, description]) => { 20 const result = Temporal.PlainYearMonth.compare(arg, arg); 21 22 assert.sameValue( 23 result, 24 0, 25 `calendar annotation (${description})` 26 ); 27 }); 28 29 reportCompare(0, 0);