tor-browser

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

offset-timezone-no-unicode-minus-sign.js (530B)


      1 // Copyright 2024 Igalia, S.L. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-createdatetimeformat
      5 description: >
      6  A valid offset time zone identifier may not include U+2212 MINUS SIGN
      7 ---*/
      8 
      9 // Note: the first character of each of these strings is U+2122 MINUS SIGN
     10 const invalidIDs = [
     11  '−0900',
     12  '−10:00',
     13  '−05',
     14 ];
     15 invalidIDs.forEach((id) => {
     16  assert.throws(RangeError, () => new Intl.DateTimeFormat("en", { timeZone: id }));
     17 });
     18 
     19 reportCompare(0, 0);