tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

argument-string-offset.js (1090B)


      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: Extended format may be used
      8 features: [Temporal]
      9 includes: [temporalHelpers.js]
     10 ---*/
     11 
     12 const expected = [1976, 11, "M11", 18, 15, 23, 30, 100, 0, 0];
     13 
     14 const strs = [
     15  "1976-11-18T152330.1+00:00",
     16  "19761118T15:23:30.1+00:00",
     17  "1976-11-18T15:23:30.1+0000",
     18  "1976-11-18T152330.1+0000",
     19  "19761118T15:23:30.1+0000",
     20  "19761118T152330.1+00:00",
     21  "19761118T152330.1+0000",
     22  "+001976-11-18T152330.1+00:00",
     23  "+0019761118T15:23:30.1+00:00",
     24  "+001976-11-18T15:23:30.1+0000",
     25  "+001976-11-18T152330.1+0000",
     26  "+0019761118T15:23:30.1+0000",
     27  "+0019761118T152330.1+00:00",
     28  "+0019761118T152330.1+0000"
     29 ];
     30 
     31 strs.forEach((s) => {
     32  TemporalHelpers.assertPlainDateTime(
     33    Temporal.PlainDateTime.from(s),
     34    ...expected,
     35    `mixture of basic and extended format (${s})`
     36  );
     37 });
     38 
     39 reportCompare(0, 0);