Remove date related types for Intl.DisplayNames (#2448)

This commit is contained in:
Frank Yung-Fong Tang 2019-12-23 10:07:36 -08:00 committed by Leo Balter
parent 502cc20010
commit 31f1bb5a75
2 changed files with 5 additions and 10 deletions

View File

@ -21,7 +21,7 @@ info: |
... ...
11. Let style be ? GetOption(options, "style", "string", « "narrow", "short", "long" », "long"). 11. Let style be ? GetOption(options, "style", "string", « "narrow", "short", "long" », "long").
... ...
13. Let type be ? GetOption(options, "type", "string", « "language", "region", "script", "currency", "weekday", "month", "quarter", "dayPeriod", "dateTimeField" », "language"). 13. Let type be ? GetOption(options, "type", "string", « "language", "region", "script", "currency" », "language").
... ...
15. Let fallback be ? GetOption(options, "fallback", "string", « "code", "none" », "code"). 15. Let fallback be ? GetOption(options, "fallback", "string", « "code", "none" », "code").
... ...
@ -41,12 +41,7 @@ var values = [
'language', 'language',
'region', 'region',
'script', 'script',
'currency', 'currency'
'weekday',
'month',
'quarter',
'dayPeriod',
'dateTimeField'
]; ];
for (let valid of values) { for (let valid of values) {

View File

@ -35,8 +35,8 @@ info: |
%DisplayNames%.[[RelevantExtensionKeys]]). %DisplayNames%.[[RelevantExtensionKeys]]).
11. Let style be ? GetOption(options, "style", "string", « "narrow", "short", "long" », "long"). 11. Let style be ? GetOption(options, "style", "string", « "narrow", "short", "long" », "long").
... ...
13. Let type be ? GetOption(options, "type", "string", « "language", "region", "script", "currency", 13. Let type be ? GetOption(options, "type", "string", « "language", "region", "script", "currency"»,
"weekday", "month", "quarter", "dayPeriod", "dateTimeField" », "language"). "language").
... ...
15. Let fallback be ? GetOption(options, "fallback", "string", « "code", "none" », "code"). 15. Let fallback be ? GetOption(options, "fallback", "string", « "code", "none" », "code").
... ...
@ -54,7 +54,7 @@ features: [Intl.DisplayNames]
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
var types = ['language', 'region', 'script', 'currency', 'weekday', 'month', 'quarter', 'dayPeriod', 'dateTimeField']; var types = ['language', 'region', 'script', 'currency'];
types.forEach(type => { types.forEach(type => {
var dn = new Intl.DisplayNames('en-US', { type }); var dn = new Intl.DisplayNames('en-US', { type });