summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/Temporal/ZonedDateTime/prototype/toLocaleString/offset-time-zone-not-supported.js
blob: 4522df5ab2ebf5b8075cf71a53ab58cceb55fd34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
// Copyright (C) 2023 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-temporal.zoneddatetime.prototype.tolocalestring
description: Offset time zones are not supported yet by Intl
features: [Temporal]
---*/

const datetime = new Temporal.ZonedDateTime(0n, "+00:00");
assert.throws(RangeError, () => datetime.toLocaleString(), "Intl.DateTimeFormat does not yet specify what to do with offset time zones");

reportCompare(0, 0);