mirror of
https://github.com/tc39/test262.git
synced 2025-07-13 00:54:39 +02:00
parent
49eee8bf9d
commit
ab046dc1ea
@ -4,16 +4,15 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-initializedatetimeformat
|
esid: sec-initializedatetimeformat
|
||||||
description: >
|
description: >
|
||||||
Checks error cases for the options argument to the DateTimeFormat constructor.
|
Checks error cases for the options argument to the DateTimeFormat constructor.
|
||||||
info: |
|
info: |
|
||||||
[[DayPeriod]] `"dayPeriod"` `"narrow"`, `"short"`, `"long"`
|
[[DayPeriod]] `"dayPeriod"` `"narrow"`, `"short"`, `"long"`
|
||||||
InitializeDateTimeFormat ( dateTimeFormat, locales, options )
|
InitializeDateTimeFormat ( dateTimeFormat, locales, options )
|
||||||
|
|
||||||
...
|
...
|
||||||
features: [Intl.DateTimeFormat-dayPeriod]
|
features: [Intl.DateTimeFormat-dayPeriod]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
||||||
const invalidOptions = [
|
const invalidOptions = [
|
||||||
"",
|
"",
|
||||||
"LONG",
|
"LONG",
|
||||||
|
@ -4,16 +4,15 @@
|
|||||||
/*---
|
/*---
|
||||||
esid: sec-initializedatetimeformat
|
esid: sec-initializedatetimeformat
|
||||||
description: >
|
description: >
|
||||||
Checks handling of the options argument to the DateTimeFormat constructor.
|
Checks handling of the options argument to the DateTimeFormat constructor.
|
||||||
info: |
|
info: |
|
||||||
[[DayPeriod]] `"dayPeriod"` `"narrow"`, `"short"`, `"long"`
|
[[DayPeriod]] `"dayPeriod"` `"narrow"`, `"short"`, `"long"`
|
||||||
InitializeDateTimeFormat ( dateTimeFormat, locales, options )
|
InitializeDateTimeFormat ( dateTimeFormat, locales, options )
|
||||||
|
|
||||||
...
|
...
|
||||||
features: [Intl.DateTimeFormat-dayPeriod]
|
features: [Intl.DateTimeFormat-dayPeriod]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
|
||||||
const validOptions = [
|
const validOptions = [
|
||||||
[undefined, undefined],
|
[undefined, undefined],
|
||||||
["long", "long"],
|
["long", "long"],
|
||||||
|
@ -5,20 +5,19 @@
|
|||||||
esid: sec-initializedatetimeformat
|
esid: sec-initializedatetimeformat
|
||||||
description: Checks the order of getting options of 'fractionalSecondDigits' for the DateTimeFormat constructor.
|
description: Checks the order of getting options of 'fractionalSecondDigits' for the DateTimeFormat constructor.
|
||||||
info: |
|
info: |
|
||||||
ToDateTimeOptions ( options, required, defaults )
|
ToDateTimeOptions ( options, required, defaults )
|
||||||
5. If required is "time" or "any", then
|
5. If required is "time" or "any", then
|
||||||
a. For each of the property names "hour", "minute", "second", "fractionalSecondDigits", do
|
a. For each of the property names "hour", "minute", "second", "fractionalSecondDigits", do
|
||||||
|
|
||||||
InitializeDateTimeFormat ( dateTimeFormat, locales, options )
|
InitializeDateTimeFormat ( dateTimeFormat, locales, options )
|
||||||
2. Let options be ? ToDateTimeOptions(options, "any", "date").
|
2. Let options be ? ToDateTimeOptions(options, "any", "date").
|
||||||
4. Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
|
4. Let matcher be ? GetOption(options, "localeMatcher", "string", « "lookup", "best fit" », "best fit").
|
||||||
22. For each row of Table 5, except the header row, do
|
22. For each row of Table 5, except the header row, do
|
||||||
a. Let value be ? GetOption(options, prop, "string", « the strings given in the Values column of the row », undefined).
|
a. Let value be ? GetOption(options, prop, "string", « the strings given in the Values column of the row », undefined).
|
||||||
23. Let _opt_.[[FractionalSecondDigits]] be ? GetNumberOption(_options_, `"fractionalSecondDigits"`, 0, 3, 0).
|
23. Let _opt_.[[FractionalSecondDigits]] be ? GetNumberOption(_options_, `"fractionalSecondDigits"`, 0, 3, 0).
|
||||||
26. Let matcher be ? GetOption(options, "formatMatcher", "string", « "basic", "best fit" », "best fit").
|
26. Let matcher be ? GetOption(options, "formatMatcher", "string", « "basic", "best fit" », "best fit").
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
features: [Intl.DateTimeFormat-fractionalSecondDigits]
|
features: [Intl.DateTimeFormat-fractionalSecondDigits]
|
||||||
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// Just need to ensure fractionalSecondDigits are get
|
// Just need to ensure fractionalSecondDigits are get
|
||||||
|
@ -10,7 +10,6 @@ info: |
|
|||||||
a. For each of the property names "weekday", "year", "quarter", "month", "day", do
|
a. For each of the property names "weekday", "year", "quarter", "month", "day", do
|
||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
features: [Intl.DateTimeFormat-quarter]
|
features: [Intl.DateTimeFormat-quarter]
|
||||||
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
// Just need to ensure quarter are get between year and month.
|
// Just need to ensure quarter are get between year and month.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: 12.1.1_22
|
esid: sec-initializedatetimeformat
|
||||||
description: >
|
description: >
|
||||||
Tests that the behavior of a Record is not affected by
|
Tests that the behavior of a Record is not affected by
|
||||||
adversarial changes to Object.prototype.
|
adversarial changes to Object.prototype.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: 12.1.1_22
|
esid: sec-initializedatetimeformat
|
||||||
description: >
|
description: >
|
||||||
Tests that the behavior of a Record is not affected by
|
Tests that the behavior of a Record is not affected by
|
||||||
adversarial changes to Object.prototype.
|
adversarial changes to Object.prototype.
|
||||||
|
@ -2,10 +2,9 @@
|
|||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
/*---
|
/*---
|
||||||
esid: 12.1.1_22
|
esid: sec-initializedatetimeformat
|
||||||
description: >
|
description: >
|
||||||
Tests that the behavior of a Record is not affected by
|
Tests that the behavior of a Record is not affected by adversarial changes to Object.prototype.
|
||||||
adversarial changes to Object.prototype.
|
|
||||||
includes: [testIntl.js]
|
includes: [testIntl.js]
|
||||||
features: [Intl.DateTimeFormat-quarter]
|
features: [Intl.DateTimeFormat-quarter]
|
||||||
---*/
|
---*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user