mirror of
https://github.com/tc39/test262.git
synced 2025-05-05 15:30:32 +02:00
In each case, it's the scalar value associated with the "description" key. Normally in test262, this is written in either: - block notation (indicated by '>' or '|'), or - flow notation, single-line, on the same line as the key. In the cases addressed by this PR, the value is instead written in: - (1x) flow notation, *multi*-line, or - (2x) flow notation, single-line, on the line *after* the key. These are valid YAML, but they're styles that test262 doesn't otherwise use, so could conceivably confuse people or harnesses. This PR changes them to block notation.
29 lines
1.1 KiB
JavaScript
29 lines
1.1 KiB
JavaScript
// Copyright 2021 the V8 project authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
esid: sec-initializedatetimeformat
|
|
description: >
|
|
Valid values for the `timeZoneName` option of the DateTimeFormat constructor
|
|
features: [Intl.DateTimeFormat-extend-timezonename]
|
|
---*/
|
|
|
|
var dtf;
|
|
|
|
dtf = new Intl.DateTimeFormat('en', { timeZoneName: 'short' });
|
|
assert.sameValue(dtf.resolvedOptions().timeZoneName, 'short');
|
|
|
|
dtf = new Intl.DateTimeFormat('en', { timeZoneName: 'long' });
|
|
assert.sameValue(dtf.resolvedOptions().timeZoneName, 'long');
|
|
|
|
dtf = new Intl.DateTimeFormat('en', { timeZoneName: 'shortOffset' });
|
|
assert.sameValue(dtf.resolvedOptions().timeZoneName, 'shortOffset');
|
|
|
|
dtf = new Intl.DateTimeFormat('en', { timeZoneName: 'longOffset' });
|
|
assert.sameValue(dtf.resolvedOptions().timeZoneName, 'longOffset');
|
|
|
|
dtf = new Intl.DateTimeFormat('en', { timeZoneName: 'shortGeneric' });
|
|
assert.sameValue(dtf.resolvedOptions().timeZoneName, 'shortGeneric');
|
|
|
|
dtf = new Intl.DateTimeFormat('en', { timeZoneName: 'longGeneric' });
|
|
assert.sameValue(dtf.resolvedOptions().timeZoneName, 'longGeneric');
|