test262/test/intl402/DateTimeFormat/offset-timezone-no-unicode-minus-sign.js
Philip Chimento 7c985a4fd9 Make U+2212 MINUS SIGN an invalid sign character for offset time zone IDs
These are the test adjustments corresponding to the normative PR
https://github.com/tc39/ecma262/pull/3334 which reached consensus at the
June 2024 TC39 meeting.
2024-07-03 08:50:57 -07:00

18 lines
508 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright 2024 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-createdatetimeformat
description: >
A valid offset time zone identifier may not include U+2212 MINUS SIGN
---*/
// Note: the first character of each of these strings is U+2122 MINUS SIGN
const invalidIDs = [
'0900',
'10:00',
'05',
];
invalidIDs.forEach((id) => {
assert.throws(RangeError, () => new Intl.DateTimeFormat("en", { timeZone: id }));
});