tor-browser

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

argument-string-with-time-designator.js (848B)


      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: ISO 8601 time designator "T" allowed at the start of PlainTime strings
      8 includes: [temporalHelpers.js]
      9 features: [Temporal, arrow-function]
     10 ---*/
     11 
     12 const validStrings = [
     13  "T00:30",
     14  "t00:30",
     15  "T0030",
     16  "t0030",
     17  "T00:30:00",
     18  "t00:30:00",
     19  "T003000",
     20  "t003000",
     21  "T00:30:00.000000000",
     22  "t00:30:00.000000000",
     23  "T003000.000000000",
     24  "t003000.000000000",
     25 ];
     26 validStrings.forEach((arg) => {
     27  const result = Temporal.PlainTime.from(arg);
     28  TemporalHelpers.assertPlainTime(result, 0, 30, 0, 0, 0, 0, `T prefix is accepted: ${arg}`);
     29 });
     30 
     31 reportCompare(0, 0);