Debian Codegraph @

js/src/tests/test262/intl402/DateTimeFormat/offset-timezone-no-unicode-minus-sign.js

raw
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);