Changeset 194387 in webkit


Ignore:
Timestamp:
Dec 23, 2015 2:48:26 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

[INTL] Implement Intl.DateTimeFormat.prototype.resolvedOptions ()
https://bugs.webkit.org/show_bug.cgi?id=147603

Patch by Andy VanWagoner <andy@instructure.com> on 2015-12-23
Reviewed by Benjamin Poulain.

.:

  • Source/cmake/OptionsWin.cmake: Disable INTL on Windows for now

Source/JavaScriptCore:

Implements InitializeDateTimeFormat and related abstract operations
using ICU. Lazy initialization is used for DateTimeFormat.prototype.
Refactor to align with Collator work.

  • icu/unicode/udatpg.h: Added.
  • icu/unicode/unumsys.h: Added.
  • runtime/CommonIdentifiers.h:
  • runtime/IntlDateTimeFormat.cpp:

(JSC::defaultTimeZone):
(JSC::canonicalizeTimeZoneName):
(JSC::localeData):
(JSC::toDateTimeOptions):
(JSC::IntlDateTimeFormat::setFormatsFromPattern):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::weekdayString):
(JSC::IntlDateTimeFormat::eraString):
(JSC::IntlDateTimeFormat::yearString):
(JSC::IntlDateTimeFormat::monthString):
(JSC::IntlDateTimeFormat::dayString):
(JSC::IntlDateTimeFormat::hourString):
(JSC::IntlDateTimeFormat::minuteString):
(JSC::IntlDateTimeFormat::secondString):
(JSC::IntlDateTimeFormat::timeZoneNameString):
(JSC::IntlDateTimeFormat::resolvedOptions):
(JSC::IntlDateTimeFormat::format):
(JSC::IntlDateTimeFormatFuncFormatDateTime): Deleted.

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatFuncFormatDateTime):
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):

  • runtime/IntlObject.cpp:

(JSC::resolveLocale):
(JSC::getNumberingSystemsForLocale):

  • runtime/IntlObject.h:

LayoutTests:

  • js/intl-datetimeformat-expected.txt: Added resolvedOptions tests.
  • js/script-tests/intl-datetimeformat.js: Added resolvedOptions tests.

(string_appeared_here):

Location:
trunk
Files:
2 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r194140 r194387  
     12015-12-23  Andy VanWagoner  <andy@instructure.com>
     2
     3        [INTL] Implement Intl.DateTimeFormat.prototype.resolvedOptions ()
     4        https://bugs.webkit.org/show_bug.cgi?id=147603
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        * Source/cmake/OptionsWin.cmake: Disable INTL on Windows for now
     9
    1102015-12-16  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    211
  • trunk/LayoutTests/ChangeLog

    r194386 r194387  
     12015-12-23  Andy VanWagoner  <andy@instructure.com>
     2
     3        [INTL] Implement Intl.DateTimeFormat.prototype.resolvedOptions ()
     4        https://bugs.webkit.org/show_bug.cgi?id=147603
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        * js/intl-datetimeformat-expected.txt: Added resolvedOptions tests.
     9        * js/script-tests/intl-datetimeformat.js: Added resolvedOptions tests.
     10        (string_appeared_here):
     11
    1122015-12-23  Chris Aljoudi <chris@chrismatic.io> and Alex Christensen <achristensen@webkit.org>
    213
  • trunk/LayoutTests/js/intl-datetimeformat-expected.txt

    r189811 r194387  
    5555PASS new Intl.DateTimeFormat().format !== new Intl.DateTimeFormat().format is true
    5656PASS Intl.DateTimeFormat.prototype.format({ valueOf() { throw Error('4b') } }) threw exception Error: 4b.
    57 PASS Intl.DateTimeFormat.prototype.format(Infinity) threw exception RangeError: date value is not finite in DateTimeFormat.format().
     57PASS Intl.DateTimeFormat.prototype.format(Infinity) threw exception RangeError: date value is not finite in DateTimeFormat format().
    5858PASS Intl.DateTimeFormat.prototype.format.call(null, 0) is Intl.DateTimeFormat().format(0)
    5959PASS Intl.DateTimeFormat.prototype.format.call(Intl.DateTimeFormat('ar'), 0) is Intl.DateTimeFormat().format(0)
     
    6464PASS Intl.DateTimeFormat.prototype.resolvedOptions.length is 0
    6565PASS Intl.DateTimeFormat.prototype.resolvedOptions() is an instance of Object
     66PASS Intl.DateTimeFormat.prototype.resolvedOptions().locale is new Intl.DateTimeFormat().resolvedOptions().locale
     67PASS Intl.DateTimeFormat.prototype.resolvedOptions().timeZone is new Intl.DateTimeFormat().resolvedOptions().timeZone
     68PASS Intl.DateTimeFormat.prototype.resolvedOptions().calendar is new Intl.DateTimeFormat().resolvedOptions().calendar
     69PASS Intl.DateTimeFormat.prototype.resolvedOptions().numberingSystem is new Intl.DateTimeFormat().resolvedOptions().numberingSystem
     70PASS Intl.DateTimeFormat.prototype.resolvedOptions().weekday is new Intl.DateTimeFormat().resolvedOptions().weekday
     71PASS Intl.DateTimeFormat.prototype.resolvedOptions().era is new Intl.DateTimeFormat().resolvedOptions().era
     72PASS Intl.DateTimeFormat.prototype.resolvedOptions().year is new Intl.DateTimeFormat().resolvedOptions().year
     73PASS Intl.DateTimeFormat.prototype.resolvedOptions().month is new Intl.DateTimeFormat().resolvedOptions().month
     74PASS Intl.DateTimeFormat.prototype.resolvedOptions().day is new Intl.DateTimeFormat().resolvedOptions().day
     75PASS Intl.DateTimeFormat.prototype.resolvedOptions().hour is new Intl.DateTimeFormat().resolvedOptions().hour
     76PASS Intl.DateTimeFormat.prototype.resolvedOptions().hour12 is new Intl.DateTimeFormat().resolvedOptions().hour12
     77PASS Intl.DateTimeFormat.prototype.resolvedOptions().minute is new Intl.DateTimeFormat().resolvedOptions().minute
     78PASS Intl.DateTimeFormat.prototype.resolvedOptions().second is new Intl.DateTimeFormat().resolvedOptions().second
     79PASS Intl.DateTimeFormat.prototype.resolvedOptions().timeZoneName is new Intl.DateTimeFormat().resolvedOptions().timeZoneName
    6680PASS Intl.DateTimeFormat.prototype.resolvedOptions() === Intl.DateTimeFormat.prototype.resolvedOptions() is false
    6781PASS Intl.DateTimeFormat.prototype.resolvedOptions.call(5) threw exception TypeError: Intl.DateTimeFormat.prototype.resolvedOptions called on value that's not an object initialized as a DateTimeFormat.
     82PASS Intl.DateTimeFormat('$') threw exception RangeError: invalid language tag: $.
     83PASS Intl.DateTimeFormat('en', null) did not throw exception.
     84PASS Intl.DateTimeFormat('en').resolvedOptions().weekday is undefined
     85PASS Intl.DateTimeFormat('en').resolvedOptions().era is undefined
     86PASS Intl.DateTimeFormat('en').resolvedOptions().month is 'numeric'
     87PASS Intl.DateTimeFormat('en').resolvedOptions().day is 'numeric'
     88PASS Intl.DateTimeFormat('en').resolvedOptions().year is 'numeric'
     89PASS Intl.DateTimeFormat('en').resolvedOptions().hour is undefined
     90PASS Intl.DateTimeFormat('en').resolvedOptions().hour12 is undefined
     91PASS Intl.DateTimeFormat('en').resolvedOptions().minute is undefined
     92PASS Intl.DateTimeFormat('en').resolvedOptions().second is undefined
     93PASS Intl.DateTimeFormat('en').resolvedOptions().timeZoneName is undefined
     94PASS Intl.DateTimeFormat('en', { localeMatcher: { toString() { throw 'nope' } } }) threw exception nope.
     95PASS Intl.DateTimeFormat('en', { localeMatcher:'bad' }) threw exception RangeError: localeMatcher must be either "lookup" or "best fit".
     96PASS Intl.DateTimeFormat('en', { localeMatcher:'lookup' }) did not throw exception.
     97PASS Intl.DateTimeFormat('en', { localeMatcher:'best fit' }) did not throw exception.
     98PASS Intl.DateTimeFormat('en', { formatMatcher: { toString() { throw 'nope' } } }) threw exception nope.
     99PASS Intl.DateTimeFormat('en', { formatMatcher:'bad' }) threw exception RangeError: formatMatcher must be either "basic" or "best fit".
     100PASS Intl.DateTimeFormat('en', { formatMatcher:'basic' }) did not throw exception.
     101PASS Intl.DateTimeFormat('en', { formatMatcher:'best fit' }) did not throw exception.
     102PASS Intl.DateTimeFormat('en', { timeZone: 'nowhere/bogus' }) threw exception RangeError: invalid time zone: nowhere/bogus.
     103PASS Intl.DateTimeFormat('en', { timeZone: { toString() { throw 'nope' } } }) threw exception nope.
     104PASS Intl.DateTimeFormat('en', { timeZone: 'america/denver' }).resolvedOptions().timeZone is 'America/Denver'
     105PASS Intl.DateTimeFormat('en', { timeZone: 'AMERICA/LOS_ANGELES' }).resolvedOptions().timeZone is 'America/Los_Angeles'
     106PASS Intl.DateTimeFormat('en', { timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone }).resolvedOptions().timeZone is Intl.DateTimeFormat().resolvedOptions().timeZone
     107PASS Intl.DateTimeFormat('en', { timeZone: 'America/Atka' }).resolvedOptions().timeZone is 'America/Adak'
     108PASS Intl.DateTimeFormat('en', { timeZone: 'America/Ensenada' }).resolvedOptions().timeZone is 'America/Tijuana'
     109PASS Intl.DateTimeFormat('en', { timeZone: 'America/Porto_Acre' }).resolvedOptions().timeZone is 'America/Rio_Branco'
     110PASS Intl.DateTimeFormat('en', { timeZone: 'America/Shiprock' }).resolvedOptions().timeZone is 'America/Denver'
     111PASS Intl.DateTimeFormat('en', { timeZone: 'Antarctica/South_Pole' }).resolvedOptions().timeZone is 'Pacific/Auckland'
     112PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Ashkhabad' }).resolvedOptions().timeZone is 'Asia/Ashgabat'
     113PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Chongqing' }).resolvedOptions().timeZone is 'Asia/Shanghai'
     114PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Chungking' }).resolvedOptions().timeZone is 'Asia/Shanghai'
     115PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Dacca' }).resolvedOptions().timeZone is 'Asia/Dhaka'
     116PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Harbin' }).resolvedOptions().timeZone is 'Asia/Shanghai'
     117PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Kashgar' }).resolvedOptions().timeZone is 'Asia/Urumqi'
     118PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Macao' }).resolvedOptions().timeZone is 'Asia/Macau'
     119PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Tel_Aviv' }).resolvedOptions().timeZone is 'Asia/Jerusalem'
     120PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Thimbu' }).resolvedOptions().timeZone is 'Asia/Thimphu'
     121PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Ujung_Pandang' }).resolvedOptions().timeZone is 'Asia/Makassar'
     122PASS Intl.DateTimeFormat('en', { timeZone: 'Asia/Ulan_Bator' }).resolvedOptions().timeZone is 'Asia/Ulaanbaatar'
     123PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/ACT' }).resolvedOptions().timeZone is 'Australia/Sydney'
     124PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/Canberra' }).resolvedOptions().timeZone is 'Australia/Sydney'
     125PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/LHI' }).resolvedOptions().timeZone is 'Australia/Lord_Howe'
     126PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/NSW' }).resolvedOptions().timeZone is 'Australia/Sydney'
     127PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/North' }).resolvedOptions().timeZone is 'Australia/Darwin'
     128PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/Queensland' }).resolvedOptions().timeZone is 'Australia/Brisbane'
     129PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/South' }).resolvedOptions().timeZone is 'Australia/Adelaide'
     130PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/Tasmania' }).resolvedOptions().timeZone is 'Australia/Hobart'
     131PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/Victoria' }).resolvedOptions().timeZone is 'Australia/Melbourne'
     132PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/West' }).resolvedOptions().timeZone is 'Australia/Perth'
     133PASS Intl.DateTimeFormat('en', { timeZone: 'Australia/Yancowinna' }).resolvedOptions().timeZone is 'Australia/Broken_Hill'
     134PASS Intl.DateTimeFormat('en', { timeZone: 'Brazil/Acre' }).resolvedOptions().timeZone is 'America/Rio_Branco'
     135PASS Intl.DateTimeFormat('en', { timeZone: 'Brazil/DeNoronha' }).resolvedOptions().timeZone is 'America/Noronha'
     136PASS Intl.DateTimeFormat('en', { timeZone: 'Brazil/East' }).resolvedOptions().timeZone is 'America/Sao_Paulo'
     137PASS Intl.DateTimeFormat('en', { timeZone: 'Brazil/West' }).resolvedOptions().timeZone is 'America/Manaus'
     138PASS Intl.DateTimeFormat('en', { timeZone: 'Canada/Atlantic' }).resolvedOptions().timeZone is 'America/Halifax'
     139PASS Intl.DateTimeFormat('en', { timeZone: 'Canada/Central' }).resolvedOptions().timeZone is 'America/Winnipeg'
     140PASS Intl.DateTimeFormat('en', { timeZone: 'Canada/East-Saskatchewan' }).resolvedOptions().timeZone is 'America/Regina'
     141PASS Intl.DateTimeFormat('en', { timeZone: 'Canada/Eastern' }).resolvedOptions().timeZone is 'America/Toronto'
     142PASS Intl.DateTimeFormat('en', { timeZone: 'Canada/Mountain' }).resolvedOptions().timeZone is 'America/Edmonton'
     143PASS Intl.DateTimeFormat('en', { timeZone: 'Canada/Newfoundland' }).resolvedOptions().timeZone is 'America/St_Johns'
     144PASS Intl.DateTimeFormat('en', { timeZone: 'Canada/Pacific' }).resolvedOptions().timeZone is 'America/Vancouver'
     145PASS Intl.DateTimeFormat('en', { timeZone: 'Canada/Saskatchewan' }).resolvedOptions().timeZone is 'America/Regina'
     146PASS Intl.DateTimeFormat('en', { timeZone: 'Canada/Yukon' }).resolvedOptions().timeZone is 'America/Whitehorse'
     147PASS Intl.DateTimeFormat('en', { timeZone: 'Chile/Continental' }).resolvedOptions().timeZone is 'America/Santiago'
     148PASS Intl.DateTimeFormat('en', { timeZone: 'Chile/EasterIsland' }).resolvedOptions().timeZone is 'Pacific/Easter'
     149PASS Intl.DateTimeFormat('en', { timeZone: 'Cuba' }).resolvedOptions().timeZone is 'America/Havana'
     150PASS Intl.DateTimeFormat('en', { timeZone: 'Egypt' }).resolvedOptions().timeZone is 'Africa/Cairo'
     151PASS Intl.DateTimeFormat('en', { timeZone: 'Eire' }).resolvedOptions().timeZone is 'Europe/Dublin'
     152PASS Intl.DateTimeFormat('en', { timeZone: 'Europe/Belfast' }).resolvedOptions().timeZone is 'Europe/London'
     153PASS Intl.DateTimeFormat('en', { timeZone: 'Europe/Tiraspol' }).resolvedOptions().timeZone is 'Europe/Chisinau'
     154PASS Intl.DateTimeFormat('en', { timeZone: 'GB' }).resolvedOptions().timeZone is 'Europe/London'
     155PASS Intl.DateTimeFormat('en', { timeZone: 'GB-Eire' }).resolvedOptions().timeZone is 'Europe/London'
     156PASS Intl.DateTimeFormat('en', { timeZone: 'GMT+0' }).resolvedOptions().timeZone is 'UTC'
     157PASS Intl.DateTimeFormat('en', { timeZone: 'GMT-0' }).resolvedOptions().timeZone is 'UTC'
     158PASS Intl.DateTimeFormat('en', { timeZone: 'GMT0' }).resolvedOptions().timeZone is 'UTC'
     159PASS Intl.DateTimeFormat('en', { timeZone: 'Greenwich' }).resolvedOptions().timeZone is 'UTC'
     160PASS Intl.DateTimeFormat('en', { timeZone: 'Hongkong' }).resolvedOptions().timeZone is 'Asia/Hong_Kong'
     161PASS Intl.DateTimeFormat('en', { timeZone: 'Iceland' }).resolvedOptions().timeZone is 'Atlantic/Reykjavik'
     162PASS Intl.DateTimeFormat('en', { timeZone: 'Iran' }).resolvedOptions().timeZone is 'Asia/Tehran'
     163PASS Intl.DateTimeFormat('en', { timeZone: 'Israel' }).resolvedOptions().timeZone is 'Asia/Jerusalem'
     164PASS Intl.DateTimeFormat('en', { timeZone: 'Jamaica' }).resolvedOptions().timeZone is 'America/Jamaica'
     165PASS Intl.DateTimeFormat('en', { timeZone: 'Japan' }).resolvedOptions().timeZone is 'Asia/Tokyo'
     166PASS Intl.DateTimeFormat('en', { timeZone: 'Kwajalein' }).resolvedOptions().timeZone is 'Pacific/Kwajalein'
     167PASS Intl.DateTimeFormat('en', { timeZone: 'Libya' }).resolvedOptions().timeZone is 'Africa/Tripoli'
     168PASS Intl.DateTimeFormat('en', { timeZone: 'Mexico/BajaNorte' }).resolvedOptions().timeZone is 'America/Tijuana'
     169PASS Intl.DateTimeFormat('en', { timeZone: 'Mexico/BajaSur' }).resolvedOptions().timeZone is 'America/Mazatlan'
     170PASS Intl.DateTimeFormat('en', { timeZone: 'Mexico/General' }).resolvedOptions().timeZone is 'America/Mexico_City'
     171PASS Intl.DateTimeFormat('en', { timeZone: 'NZ' }).resolvedOptions().timeZone is 'Pacific/Auckland'
     172PASS Intl.DateTimeFormat('en', { timeZone: 'NZ-CHAT' }).resolvedOptions().timeZone is 'Pacific/Chatham'
     173PASS Intl.DateTimeFormat('en', { timeZone: 'Navajo' }).resolvedOptions().timeZone is 'America/Denver'
     174PASS Intl.DateTimeFormat('en', { timeZone: 'PRC' }).resolvedOptions().timeZone is 'Asia/Shanghai'
     175PASS Intl.DateTimeFormat('en', { timeZone: 'Poland' }).resolvedOptions().timeZone is 'Europe/Warsaw'
     176PASS Intl.DateTimeFormat('en', { timeZone: 'Portugal' }).resolvedOptions().timeZone is 'Europe/Lisbon'
     177PASS Intl.DateTimeFormat('en', { timeZone: 'ROC' }).resolvedOptions().timeZone is 'Asia/Taipei'
     178PASS Intl.DateTimeFormat('en', { timeZone: 'ROK' }).resolvedOptions().timeZone is 'Asia/Seoul'
     179PASS Intl.DateTimeFormat('en', { timeZone: 'Singapore' }).resolvedOptions().timeZone is 'Asia/Singapore'
     180PASS Intl.DateTimeFormat('en', { timeZone: 'Turkey' }).resolvedOptions().timeZone is 'Europe/Istanbul'
     181PASS Intl.DateTimeFormat('en', { timeZone: 'UCT' }).resolvedOptions().timeZone is 'UTC'
     182PASS Intl.DateTimeFormat('en', { timeZone: 'US/Alaska' }).resolvedOptions().timeZone is 'America/Anchorage'
     183PASS Intl.DateTimeFormat('en', { timeZone: 'US/Aleutian' }).resolvedOptions().timeZone is 'America/Adak'
     184PASS Intl.DateTimeFormat('en', { timeZone: 'US/Arizona' }).resolvedOptions().timeZone is 'America/Phoenix'
     185PASS Intl.DateTimeFormat('en', { timeZone: 'US/Central' }).resolvedOptions().timeZone is 'America/Chicago'
     186PASS Intl.DateTimeFormat('en', { timeZone: 'US/Eastern' }).resolvedOptions().timeZone is 'America/New_York'
     187PASS Intl.DateTimeFormat('en', { timeZone: 'US/Hawaii' }).resolvedOptions().timeZone is 'Pacific/Honolulu'
     188PASS Intl.DateTimeFormat('en', { timeZone: 'US/Michigan' }).resolvedOptions().timeZone is 'America/Detroit'
     189PASS Intl.DateTimeFormat('en', { timeZone: 'US/Mountain' }).resolvedOptions().timeZone is 'America/Denver'
     190PASS Intl.DateTimeFormat('en', { timeZone: 'US/Pacific' }).resolvedOptions().timeZone is 'America/Los_Angeles'
     191PASS Intl.DateTimeFormat('en', { timeZone: 'US/Samoa' }).resolvedOptions().timeZone is 'Pacific/Pago_Pago'
     192PASS Intl.DateTimeFormat('en', { timeZone: 'UTC' }).resolvedOptions().timeZone is 'UTC'
     193PASS Intl.DateTimeFormat('en', { timeZone: 'Universal' }).resolvedOptions().timeZone is 'UTC'
     194PASS Intl.DateTimeFormat('en', { timeZone: 'W-SU' }).resolvedOptions().timeZone is 'Europe/Moscow'
     195PASS Intl.DateTimeFormat('en', { timeZone: 'Zulu' }).resolvedOptions().timeZone is 'UTC'
     196PASS Intl.DateTimeFormat('ar-sa').resolvedOptions().locale is 'ar-SA'
     197PASS Intl.DateTimeFormat('ar-sa').resolvedOptions().calendar is 'islamic-umalqura'
     198PASS Intl.DateTimeFormat('ar-sa').resolvedOptions().numberingSystem is 'arab'
     199PASS Intl.DateTimeFormat('en', { calendar:'dangi' }).resolvedOptions().calendar is 'gregorian'
     200PASS Intl.DateTimeFormat('en-u-ca-bogus').resolvedOptions().locale is 'en'
     201PASS Intl.DateTimeFormat('en-u-ca-bogus').resolvedOptions().calendar is 'gregorian'
     202PASS Intl.DateTimeFormat('en-u-ca-buddhist').resolvedOptions().locale is 'en-u-ca-buddhist'
     203PASS Intl.DateTimeFormat('en-u-ca-buddhist').resolvedOptions().calendar is 'buddhist'
     204PASS Intl.DateTimeFormat('en-u-ca-chinese').resolvedOptions().calendar is 'chinese'
     205PASS Intl.DateTimeFormat('en-u-ca-coptic').resolvedOptions().calendar is 'coptic'
     206PASS Intl.DateTimeFormat('en-u-ca-dangi').resolvedOptions().calendar is 'dangi'
     207PASS Intl.DateTimeFormat('en-u-ca-ethioaa').resolvedOptions().calendar is 'ethiopic-amete-alem'
     208PASS Intl.DateTimeFormat('en-u-ca-ethiopic').resolvedOptions().calendar is 'ethiopic'
     209PASS Intl.DateTimeFormat('ar-SA-u-ca-gregory').resolvedOptions().calendar is 'gregorian'
     210PASS Intl.DateTimeFormat('en-u-ca-hebrew').resolvedOptions().calendar is 'hebrew'
     211PASS Intl.DateTimeFormat('en-u-ca-indian').resolvedOptions().calendar is 'indian'
     212PASS Intl.DateTimeFormat('en-u-ca-islamic').resolvedOptions().calendar is 'islamic'
     213PASS Intl.DateTimeFormat('en-u-ca-islamicc').resolvedOptions().calendar is 'islamic-civil'
     214PASS Intl.DateTimeFormat('en-u-ca-ISO8601').resolvedOptions().calendar is 'iso8601'
     215PASS Intl.DateTimeFormat('en-u-ca-japanese').resolvedOptions().calendar is 'japanese'
     216PASS Intl.DateTimeFormat('en-u-ca-persian').resolvedOptions().calendar is 'persian'
     217PASS Intl.DateTimeFormat('en-u-ca-roc').resolvedOptions().calendar is 'roc'
     218PASS Intl.DateTimeFormat('en', { numberingSystem:'gujr' }).resolvedOptions().numberingSystem is 'latn'
     219PASS Intl.DateTimeFormat('en-u-nu-bogus').resolvedOptions().locale is 'en'
     220PASS Intl.DateTimeFormat('en-u-nu-bogus').resolvedOptions().numberingSystem is 'latn'
     221PASS Intl.DateTimeFormat('en-u-nu-latn').resolvedOptions().numberingSystem is 'latn'
     222PASS Intl.DateTimeFormat('en-u-nu-arab').resolvedOptions().locale is 'en-u-nu-arab'
     223PASS Intl.DateTimeFormat('en-u-nu-arab').resolvedOptions().numberingSystem is 'arab'
     224PASS Intl.DateTimeFormat('en-u-nu-arabext').resolvedOptions().numberingSystem is 'arabext'
     225PASS Intl.DateTimeFormat('en-u-nu-armn').resolvedOptions().numberingSystem is 'armn'
     226PASS Intl.DateTimeFormat('en-u-nu-armnlow').resolvedOptions().numberingSystem is 'armnlow'
     227PASS Intl.DateTimeFormat('en-u-nu-bali').resolvedOptions().numberingSystem is 'bali'
     228PASS Intl.DateTimeFormat('en-u-nu-beng').resolvedOptions().numberingSystem is 'beng'
     229PASS Intl.DateTimeFormat('en-u-nu-cham').resolvedOptions().numberingSystem is 'cham'
     230PASS Intl.DateTimeFormat('en-u-nu-deva').resolvedOptions().numberingSystem is 'deva'
     231PASS Intl.DateTimeFormat('en-u-nu-ethi').resolvedOptions().numberingSystem is 'ethi'
     232PASS Intl.DateTimeFormat('en-u-nu-fullwide').resolvedOptions().numberingSystem is 'fullwide'
     233PASS Intl.DateTimeFormat('en-u-nu-geor').resolvedOptions().numberingSystem is 'geor'
     234PASS Intl.DateTimeFormat('en-u-nu-grek').resolvedOptions().numberingSystem is 'grek'
     235PASS Intl.DateTimeFormat('en-u-nu-greklow').resolvedOptions().numberingSystem is 'greklow'
     236PASS Intl.DateTimeFormat('en-u-nu-gujr').resolvedOptions().numberingSystem is 'gujr'
     237PASS Intl.DateTimeFormat('en-u-nu-guru').resolvedOptions().numberingSystem is 'guru'
     238PASS Intl.DateTimeFormat('en-u-nu-hanidays').resolvedOptions().numberingSystem is 'hanidays'
     239PASS Intl.DateTimeFormat('en-u-nu-hanidec').resolvedOptions().numberingSystem is 'hanidec'
     240PASS Intl.DateTimeFormat('en-u-nu-hans').resolvedOptions().numberingSystem is 'hans'
     241PASS Intl.DateTimeFormat('en-u-nu-hansfin').resolvedOptions().numberingSystem is 'hansfin'
     242PASS Intl.DateTimeFormat('en-u-nu-hant').resolvedOptions().numberingSystem is 'hant'
     243PASS Intl.DateTimeFormat('en-u-nu-hantfin').resolvedOptions().numberingSystem is 'hantfin'
     244PASS Intl.DateTimeFormat('en-u-nu-hebr').resolvedOptions().numberingSystem is 'hebr'
     245PASS Intl.DateTimeFormat('en-u-nu-java').resolvedOptions().numberingSystem is 'java'
     246PASS Intl.DateTimeFormat('en-u-nu-jpan').resolvedOptions().numberingSystem is 'jpan'
     247PASS Intl.DateTimeFormat('en-u-nu-jpanfin').resolvedOptions().numberingSystem is 'jpanfin'
     248PASS Intl.DateTimeFormat('en-u-nu-kali').resolvedOptions().numberingSystem is 'kali'
     249PASS Intl.DateTimeFormat('en-u-nu-khmr').resolvedOptions().numberingSystem is 'khmr'
     250PASS Intl.DateTimeFormat('en-u-nu-knda').resolvedOptions().numberingSystem is 'knda'
     251PASS Intl.DateTimeFormat('en-u-nu-lana').resolvedOptions().numberingSystem is 'lana'
     252PASS Intl.DateTimeFormat('en-u-nu-lanatham').resolvedOptions().numberingSystem is 'lanatham'
     253PASS Intl.DateTimeFormat('en-u-nu-laoo').resolvedOptions().numberingSystem is 'laoo'
     254PASS Intl.DateTimeFormat('en-u-nu-latn').resolvedOptions().numberingSystem is 'latn'
     255PASS Intl.DateTimeFormat('en-u-nu-lepc').resolvedOptions().numberingSystem is 'lepc'
     256PASS Intl.DateTimeFormat('en-u-nu-limb').resolvedOptions().numberingSystem is 'limb'
     257PASS Intl.DateTimeFormat('en-u-nu-mlym').resolvedOptions().numberingSystem is 'mlym'
     258PASS Intl.DateTimeFormat('en-u-nu-mong').resolvedOptions().numberingSystem is 'mong'
     259PASS Intl.DateTimeFormat('en-u-nu-mtei').resolvedOptions().numberingSystem is 'mtei'
     260PASS Intl.DateTimeFormat('en-u-nu-mymr').resolvedOptions().numberingSystem is 'mymr'
     261PASS Intl.DateTimeFormat('en-u-nu-mymrshan').resolvedOptions().numberingSystem is 'mymrshan'
     262PASS Intl.DateTimeFormat('en-u-nu-nkoo').resolvedOptions().numberingSystem is 'nkoo'
     263PASS Intl.DateTimeFormat('en-u-nu-olck').resolvedOptions().numberingSystem is 'olck'
     264PASS Intl.DateTimeFormat('en-u-nu-orya').resolvedOptions().numberingSystem is 'orya'
     265PASS Intl.DateTimeFormat('en-u-nu-roman').resolvedOptions().numberingSystem is 'roman'
     266PASS Intl.DateTimeFormat('en-u-nu-romanlow').resolvedOptions().numberingSystem is 'romanlow'
     267PASS Intl.DateTimeFormat('en-u-nu-saur').resolvedOptions().numberingSystem is 'saur'
     268PASS Intl.DateTimeFormat('en-u-nu-sund').resolvedOptions().numberingSystem is 'sund'
     269PASS Intl.DateTimeFormat('en-u-nu-talu').resolvedOptions().numberingSystem is 'talu'
     270PASS Intl.DateTimeFormat('en-u-nu-taml').resolvedOptions().numberingSystem is 'taml'
     271PASS Intl.DateTimeFormat('en-u-nu-tamldec').resolvedOptions().numberingSystem is 'tamldec'
     272PASS Intl.DateTimeFormat('en-u-nu-telu').resolvedOptions().numberingSystem is 'telu'
     273PASS Intl.DateTimeFormat('en-u-nu-thai').resolvedOptions().numberingSystem is 'thai'
     274PASS Intl.DateTimeFormat('en-u-nu-tibt').resolvedOptions().numberingSystem is 'tibt'
     275PASS Intl.DateTimeFormat('en-u-nu-vaii').resolvedOptions().numberingSystem is 'vaii'
     276PASS Intl.DateTimeFormat('en', { weekday: { toString() { throw 'weekday' } } }) threw exception weekday.
     277PASS Intl.DateTimeFormat('en', { weekday:'invalid' }) threw exception RangeError: weekday must be "narrow", "short", or "long".
     278PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().weekday is undefined
     279PASS Intl.DateTimeFormat('en', { weekday:'narrow', month:'numeric', day:'numeric' }).resolvedOptions().weekday is 'narrow'
     280PASS Intl.DateTimeFormat('en', { weekday:'short', month:'numeric', day:'numeric' }).resolvedOptions().weekday is 'short'
     281PASS Intl.DateTimeFormat('en', { weekday:'long', month:'numeric', day:'numeric' }).resolvedOptions().weekday is 'long'
     282PASS Intl.DateTimeFormat('en', { era: { toString() { throw 'era' } } }) threw exception era.
     283PASS Intl.DateTimeFormat('en', { era:'never' }) threw exception RangeError: era must be "narrow", "short", or "long".
     284PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().day is undefined
     285PASS Intl.DateTimeFormat('en', { era:'narrow', year:'numeric' }).resolvedOptions().era is 'narrow'
     286PASS Intl.DateTimeFormat('en', { era:'short', year:'numeric' }).resolvedOptions().era is 'short'
     287PASS Intl.DateTimeFormat('en', { era:'long', year:'numeric' }).resolvedOptions().era is 'long'
     288PASS Intl.DateTimeFormat('en', { year: { toString() { throw 'year' } } }) threw exception year.
     289PASS Intl.DateTimeFormat('en', { year:'nope' }) threw exception RangeError: year must be "2-digit" or "numeric".
     290PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().year is undefined
     291PASS Intl.DateTimeFormat('en', { era:'narrow', year:'2-digit' }).resolvedOptions().year is '2-digit'
     292PASS Intl.DateTimeFormat('en', { era:'narrow', year:'numeric' }).resolvedOptions().year is 'numeric'
     293PASS Intl.DateTimeFormat('en', { month: { toString() { throw 'month' } } }) threw exception month.
     294PASS Intl.DateTimeFormat('en', { month:2 }) threw exception RangeError: month must be "2-digit", "numeric", "narrow", "short", or "long".
     295PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().month is undefined
     296PASS Intl.DateTimeFormat('en', { month:'2-digit', year:'numeric' }).resolvedOptions().month is '2-digit'
     297PASS Intl.DateTimeFormat('en', { month:'numeric', year:'numeric' }).resolvedOptions().month is 'numeric'
     298PASS Intl.DateTimeFormat('en', { month:'narrow', year:'numeric' }).resolvedOptions().month is 'narrow'
     299PASS Intl.DateTimeFormat('en', { month:'short', year:'numeric' }).resolvedOptions().month is 'short'
     300PASS Intl.DateTimeFormat('en', { month:'long', year:'numeric' }).resolvedOptions().month is 'long'
     301PASS Intl.DateTimeFormat('en', { day: { toString() { throw 'day' } } }) threw exception day.
     302PASS Intl.DateTimeFormat('en', { day:'' }) threw exception RangeError: day must be "2-digit" or "numeric".
     303PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().day is undefined
     304PASS Intl.DateTimeFormat('en', { month:'long', day:'2-digit' }).resolvedOptions().day is '2-digit'
     305PASS Intl.DateTimeFormat('en', { month:'long', day:'numeric' }).resolvedOptions().day is 'numeric'
     306PASS Intl.DateTimeFormat('en', { hour: { toString() { throw 'hour' } } }) threw exception hour.
     307PASS Intl.DateTimeFormat('en', { hour:[] }) threw exception RangeError: hour must be "2-digit" or "numeric".
     308PASS Intl.DateTimeFormat('en').resolvedOptions().hour is undefined
     309PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'2-digit' }).resolvedOptions().hour is 'numeric'
     310PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().hour is 'numeric'
     311PASS Intl.DateTimeFormat('en').resolvedOptions().hour12 is undefined
     312PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().hour12 is true
     313PASS Intl.DateTimeFormat('pt-BR', { minute:'2-digit', hour:'numeric' }).resolvedOptions().hour12 is false
     314PASS Intl.DateTimeFormat('en', { minute: { toString() { throw 'minute' } } }) threw exception minute.
     315PASS Intl.DateTimeFormat('en', { minute:null }) threw exception RangeError: minute must be "2-digit" or "numeric".
     316PASS Intl.DateTimeFormat('en').resolvedOptions().minute is undefined
     317PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().minute is '2-digit'
     318PASS Intl.DateTimeFormat('en', { minute:'numeric', hour:'numeric' }).resolvedOptions().minute is '2-digit'
     319PASS Intl.DateTimeFormat('en', { second: { toString() { throw 'second' } } }) threw exception second.
     320PASS Intl.DateTimeFormat('en', { second:'badvalue' }) threw exception RangeError: second must be "2-digit" or "numeric".
     321PASS Intl.DateTimeFormat('en').resolvedOptions().second is undefined
     322PASS Intl.DateTimeFormat('en', { minute:'numeric', hour:'numeric', second:'2-digit' }).resolvedOptions().second is '2-digit'
     323PASS Intl.DateTimeFormat('en', { minute:'numeric', hour:'numeric', second:'numeric' }).resolvedOptions().second is '2-digit'
     324PASS Intl.DateTimeFormat('en', { timeZoneName: { toString() { throw 'timeZoneName' } } }) threw exception timeZoneName.
     325PASS Intl.DateTimeFormat('en', { timeZoneName:'name' }) threw exception RangeError: timeZoneName must be "short" or "long".
     326PASS Intl.DateTimeFormat('en').resolvedOptions().timeZoneName is undefined
     327PASS Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric', timeZoneName:'short' }).resolvedOptions().timeZoneName is 'short'
     328PASS Intl.DateTimeFormat('pt-BR', { minute:'2-digit', hour:'numeric', timeZoneName:'long' }).resolvedOptions().timeZoneName is 'long'
     329PASS
     330    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     331    var resolved = Intl.DateTimeFormat("ar", options).resolvedOptions();
     332    Object.keys(options).every(option => resolved[option] != null) is true
     333PASS
     334    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     335    var resolved = Intl.DateTimeFormat("ar", options).resolvedOptions();
     336    Object.keys(options).every(option => resolved[option] != null) is true
     337PASS
     338    var options = { year: "numeric", month: "long", day: "numeric" };
     339    var resolved = Intl.DateTimeFormat("ar", options).resolvedOptions();
     340    Object.keys(options).every(option => resolved[option] != null) is true
     341PASS
     342    var options = { year: "numeric", month: "long" };
     343    var resolved = Intl.DateTimeFormat("ar", options).resolvedOptions();
     344    Object.keys(options).every(option => resolved[option] != null) is true
     345PASS
     346    var options = { month: "long", day: "numeric" };
     347    var resolved = Intl.DateTimeFormat("ar", options).resolvedOptions();
     348    Object.keys(options).every(option => resolved[option] != null) is true
     349PASS
     350    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     351    var resolved = Intl.DateTimeFormat("ar", options).resolvedOptions();
     352    Object.keys(options).every(option => resolved[option] != null) is true
     353PASS
     354    var options = { hour: "numeric", minute: "numeric" };
     355    var resolved = Intl.DateTimeFormat("ar", options).resolvedOptions();
     356    Object.keys(options).every(option => resolved[option] != null) is true
     357PASS
     358    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     359    var resolved = Intl.DateTimeFormat("ar-SA", options).resolvedOptions();
     360    Object.keys(options).every(option => resolved[option] != null) is true
     361PASS
     362    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     363    var resolved = Intl.DateTimeFormat("ar-SA", options).resolvedOptions();
     364    Object.keys(options).every(option => resolved[option] != null) is true
     365PASS
     366    var options = { year: "numeric", month: "long", day: "numeric" };
     367    var resolved = Intl.DateTimeFormat("ar-SA", options).resolvedOptions();
     368    Object.keys(options).every(option => resolved[option] != null) is true
     369PASS
     370    var options = { year: "numeric", month: "long" };
     371    var resolved = Intl.DateTimeFormat("ar-SA", options).resolvedOptions();
     372    Object.keys(options).every(option => resolved[option] != null) is true
     373PASS
     374    var options = { month: "long", day: "numeric" };
     375    var resolved = Intl.DateTimeFormat("ar-SA", options).resolvedOptions();
     376    Object.keys(options).every(option => resolved[option] != null) is true
     377PASS
     378    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     379    var resolved = Intl.DateTimeFormat("ar-SA", options).resolvedOptions();
     380    Object.keys(options).every(option => resolved[option] != null) is true
     381PASS
     382    var options = { hour: "numeric", minute: "numeric" };
     383    var resolved = Intl.DateTimeFormat("ar-SA", options).resolvedOptions();
     384    Object.keys(options).every(option => resolved[option] != null) is true
     385PASS
     386    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     387    var resolved = Intl.DateTimeFormat("be", options).resolvedOptions();
     388    Object.keys(options).every(option => resolved[option] != null) is true
     389PASS
     390    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     391    var resolved = Intl.DateTimeFormat("be", options).resolvedOptions();
     392    Object.keys(options).every(option => resolved[option] != null) is true
     393PASS
     394    var options = { year: "numeric", month: "long", day: "numeric" };
     395    var resolved = Intl.DateTimeFormat("be", options).resolvedOptions();
     396    Object.keys(options).every(option => resolved[option] != null) is true
     397PASS
     398    var options = { year: "numeric", month: "long" };
     399    var resolved = Intl.DateTimeFormat("be", options).resolvedOptions();
     400    Object.keys(options).every(option => resolved[option] != null) is true
     401PASS
     402    var options = { month: "long", day: "numeric" };
     403    var resolved = Intl.DateTimeFormat("be", options).resolvedOptions();
     404    Object.keys(options).every(option => resolved[option] != null) is true
     405PASS
     406    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     407    var resolved = Intl.DateTimeFormat("be", options).resolvedOptions();
     408    Object.keys(options).every(option => resolved[option] != null) is true
     409PASS
     410    var options = { hour: "numeric", minute: "numeric" };
     411    var resolved = Intl.DateTimeFormat("be", options).resolvedOptions();
     412    Object.keys(options).every(option => resolved[option] != null) is true
     413PASS
     414    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     415    var resolved = Intl.DateTimeFormat("ca", options).resolvedOptions();
     416    Object.keys(options).every(option => resolved[option] != null) is true
     417PASS
     418    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     419    var resolved = Intl.DateTimeFormat("ca", options).resolvedOptions();
     420    Object.keys(options).every(option => resolved[option] != null) is true
     421PASS
     422    var options = { year: "numeric", month: "long", day: "numeric" };
     423    var resolved = Intl.DateTimeFormat("ca", options).resolvedOptions();
     424    Object.keys(options).every(option => resolved[option] != null) is true
     425PASS
     426    var options = { year: "numeric", month: "long" };
     427    var resolved = Intl.DateTimeFormat("ca", options).resolvedOptions();
     428    Object.keys(options).every(option => resolved[option] != null) is true
     429PASS
     430    var options = { month: "long", day: "numeric" };
     431    var resolved = Intl.DateTimeFormat("ca", options).resolvedOptions();
     432    Object.keys(options).every(option => resolved[option] != null) is true
     433PASS
     434    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     435    var resolved = Intl.DateTimeFormat("ca", options).resolvedOptions();
     436    Object.keys(options).every(option => resolved[option] != null) is true
     437PASS
     438    var options = { hour: "numeric", minute: "numeric" };
     439    var resolved = Intl.DateTimeFormat("ca", options).resolvedOptions();
     440    Object.keys(options).every(option => resolved[option] != null) is true
     441PASS
     442    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     443    var resolved = Intl.DateTimeFormat("cs", options).resolvedOptions();
     444    Object.keys(options).every(option => resolved[option] != null) is true
     445PASS
     446    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     447    var resolved = Intl.DateTimeFormat("cs", options).resolvedOptions();
     448    Object.keys(options).every(option => resolved[option] != null) is true
     449PASS
     450    var options = { year: "numeric", month: "long", day: "numeric" };
     451    var resolved = Intl.DateTimeFormat("cs", options).resolvedOptions();
     452    Object.keys(options).every(option => resolved[option] != null) is true
     453PASS
     454    var options = { year: "numeric", month: "long" };
     455    var resolved = Intl.DateTimeFormat("cs", options).resolvedOptions();
     456    Object.keys(options).every(option => resolved[option] != null) is true
     457PASS
     458    var options = { month: "long", day: "numeric" };
     459    var resolved = Intl.DateTimeFormat("cs", options).resolvedOptions();
     460    Object.keys(options).every(option => resolved[option] != null) is true
     461PASS
     462    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     463    var resolved = Intl.DateTimeFormat("cs", options).resolvedOptions();
     464    Object.keys(options).every(option => resolved[option] != null) is true
     465PASS
     466    var options = { hour: "numeric", minute: "numeric" };
     467    var resolved = Intl.DateTimeFormat("cs", options).resolvedOptions();
     468    Object.keys(options).every(option => resolved[option] != null) is true
     469PASS
     470    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     471    var resolved = Intl.DateTimeFormat("da", options).resolvedOptions();
     472    Object.keys(options).every(option => resolved[option] != null) is true
     473PASS
     474    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     475    var resolved = Intl.DateTimeFormat("da", options).resolvedOptions();
     476    Object.keys(options).every(option => resolved[option] != null) is true
     477PASS
     478    var options = { year: "numeric", month: "long", day: "numeric" };
     479    var resolved = Intl.DateTimeFormat("da", options).resolvedOptions();
     480    Object.keys(options).every(option => resolved[option] != null) is true
     481PASS
     482    var options = { year: "numeric", month: "long" };
     483    var resolved = Intl.DateTimeFormat("da", options).resolvedOptions();
     484    Object.keys(options).every(option => resolved[option] != null) is true
     485PASS
     486    var options = { month: "long", day: "numeric" };
     487    var resolved = Intl.DateTimeFormat("da", options).resolvedOptions();
     488    Object.keys(options).every(option => resolved[option] != null) is true
     489PASS
     490    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     491    var resolved = Intl.DateTimeFormat("da", options).resolvedOptions();
     492    Object.keys(options).every(option => resolved[option] != null) is true
     493PASS
     494    var options = { hour: "numeric", minute: "numeric" };
     495    var resolved = Intl.DateTimeFormat("da", options).resolvedOptions();
     496    Object.keys(options).every(option => resolved[option] != null) is true
     497PASS
     498    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     499    var resolved = Intl.DateTimeFormat("de", options).resolvedOptions();
     500    Object.keys(options).every(option => resolved[option] != null) is true
     501PASS
     502    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     503    var resolved = Intl.DateTimeFormat("de", options).resolvedOptions();
     504    Object.keys(options).every(option => resolved[option] != null) is true
     505PASS
     506    var options = { year: "numeric", month: "long", day: "numeric" };
     507    var resolved = Intl.DateTimeFormat("de", options).resolvedOptions();
     508    Object.keys(options).every(option => resolved[option] != null) is true
     509PASS
     510    var options = { year: "numeric", month: "long" };
     511    var resolved = Intl.DateTimeFormat("de", options).resolvedOptions();
     512    Object.keys(options).every(option => resolved[option] != null) is true
     513PASS
     514    var options = { month: "long", day: "numeric" };
     515    var resolved = Intl.DateTimeFormat("de", options).resolvedOptions();
     516    Object.keys(options).every(option => resolved[option] != null) is true
     517PASS
     518    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     519    var resolved = Intl.DateTimeFormat("de", options).resolvedOptions();
     520    Object.keys(options).every(option => resolved[option] != null) is true
     521PASS
     522    var options = { hour: "numeric", minute: "numeric" };
     523    var resolved = Intl.DateTimeFormat("de", options).resolvedOptions();
     524    Object.keys(options).every(option => resolved[option] != null) is true
     525PASS
     526    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     527    var resolved = Intl.DateTimeFormat("de-CH", options).resolvedOptions();
     528    Object.keys(options).every(option => resolved[option] != null) is true
     529PASS
     530    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     531    var resolved = Intl.DateTimeFormat("de-CH", options).resolvedOptions();
     532    Object.keys(options).every(option => resolved[option] != null) is true
     533PASS
     534    var options = { year: "numeric", month: "long", day: "numeric" };
     535    var resolved = Intl.DateTimeFormat("de-CH", options).resolvedOptions();
     536    Object.keys(options).every(option => resolved[option] != null) is true
     537PASS
     538    var options = { year: "numeric", month: "long" };
     539    var resolved = Intl.DateTimeFormat("de-CH", options).resolvedOptions();
     540    Object.keys(options).every(option => resolved[option] != null) is true
     541PASS
     542    var options = { month: "long", day: "numeric" };
     543    var resolved = Intl.DateTimeFormat("de-CH", options).resolvedOptions();
     544    Object.keys(options).every(option => resolved[option] != null) is true
     545PASS
     546    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     547    var resolved = Intl.DateTimeFormat("de-CH", options).resolvedOptions();
     548    Object.keys(options).every(option => resolved[option] != null) is true
     549PASS
     550    var options = { hour: "numeric", minute: "numeric" };
     551    var resolved = Intl.DateTimeFormat("de-CH", options).resolvedOptions();
     552    Object.keys(options).every(option => resolved[option] != null) is true
     553PASS
     554    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     555    var resolved = Intl.DateTimeFormat("en", options).resolvedOptions();
     556    Object.keys(options).every(option => resolved[option] != null) is true
     557PASS
     558    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     559    var resolved = Intl.DateTimeFormat("en", options).resolvedOptions();
     560    Object.keys(options).every(option => resolved[option] != null) is true
     561PASS
     562    var options = { year: "numeric", month: "long", day: "numeric" };
     563    var resolved = Intl.DateTimeFormat("en", options).resolvedOptions();
     564    Object.keys(options).every(option => resolved[option] != null) is true
     565PASS
     566    var options = { year: "numeric", month: "long" };
     567    var resolved = Intl.DateTimeFormat("en", options).resolvedOptions();
     568    Object.keys(options).every(option => resolved[option] != null) is true
     569PASS
     570    var options = { month: "long", day: "numeric" };
     571    var resolved = Intl.DateTimeFormat("en", options).resolvedOptions();
     572    Object.keys(options).every(option => resolved[option] != null) is true
     573PASS
     574    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     575    var resolved = Intl.DateTimeFormat("en", options).resolvedOptions();
     576    Object.keys(options).every(option => resolved[option] != null) is true
     577PASS
     578    var options = { hour: "numeric", minute: "numeric" };
     579    var resolved = Intl.DateTimeFormat("en", options).resolvedOptions();
     580    Object.keys(options).every(option => resolved[option] != null) is true
     581PASS
     582    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     583    var resolved = Intl.DateTimeFormat("en-AU", options).resolvedOptions();
     584    Object.keys(options).every(option => resolved[option] != null) is true
     585PASS
     586    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     587    var resolved = Intl.DateTimeFormat("en-AU", options).resolvedOptions();
     588    Object.keys(options).every(option => resolved[option] != null) is true
     589PASS
     590    var options = { year: "numeric", month: "long", day: "numeric" };
     591    var resolved = Intl.DateTimeFormat("en-AU", options).resolvedOptions();
     592    Object.keys(options).every(option => resolved[option] != null) is true
     593PASS
     594    var options = { year: "numeric", month: "long" };
     595    var resolved = Intl.DateTimeFormat("en-AU", options).resolvedOptions();
     596    Object.keys(options).every(option => resolved[option] != null) is true
     597PASS
     598    var options = { month: "long", day: "numeric" };
     599    var resolved = Intl.DateTimeFormat("en-AU", options).resolvedOptions();
     600    Object.keys(options).every(option => resolved[option] != null) is true
     601PASS
     602    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     603    var resolved = Intl.DateTimeFormat("en-AU", options).resolvedOptions();
     604    Object.keys(options).every(option => resolved[option] != null) is true
     605PASS
     606    var options = { hour: "numeric", minute: "numeric" };
     607    var resolved = Intl.DateTimeFormat("en-AU", options).resolvedOptions();
     608    Object.keys(options).every(option => resolved[option] != null) is true
     609PASS
     610    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     611    var resolved = Intl.DateTimeFormat("en-GB", options).resolvedOptions();
     612    Object.keys(options).every(option => resolved[option] != null) is true
     613PASS
     614    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     615    var resolved = Intl.DateTimeFormat("en-GB", options).resolvedOptions();
     616    Object.keys(options).every(option => resolved[option] != null) is true
     617PASS
     618    var options = { year: "numeric", month: "long", day: "numeric" };
     619    var resolved = Intl.DateTimeFormat("en-GB", options).resolvedOptions();
     620    Object.keys(options).every(option => resolved[option] != null) is true
     621PASS
     622    var options = { year: "numeric", month: "long" };
     623    var resolved = Intl.DateTimeFormat("en-GB", options).resolvedOptions();
     624    Object.keys(options).every(option => resolved[option] != null) is true
     625PASS
     626    var options = { month: "long", day: "numeric" };
     627    var resolved = Intl.DateTimeFormat("en-GB", options).resolvedOptions();
     628    Object.keys(options).every(option => resolved[option] != null) is true
     629PASS
     630    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     631    var resolved = Intl.DateTimeFormat("en-GB", options).resolvedOptions();
     632    Object.keys(options).every(option => resolved[option] != null) is true
     633PASS
     634    var options = { hour: "numeric", minute: "numeric" };
     635    var resolved = Intl.DateTimeFormat("en-GB", options).resolvedOptions();
     636    Object.keys(options).every(option => resolved[option] != null) is true
     637PASS
     638    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     639    var resolved = Intl.DateTimeFormat("en-PH", options).resolvedOptions();
     640    Object.keys(options).every(option => resolved[option] != null) is true
     641PASS
     642    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     643    var resolved = Intl.DateTimeFormat("en-PH", options).resolvedOptions();
     644    Object.keys(options).every(option => resolved[option] != null) is true
     645PASS
     646    var options = { year: "numeric", month: "long", day: "numeric" };
     647    var resolved = Intl.DateTimeFormat("en-PH", options).resolvedOptions();
     648    Object.keys(options).every(option => resolved[option] != null) is true
     649PASS
     650    var options = { year: "numeric", month: "long" };
     651    var resolved = Intl.DateTimeFormat("en-PH", options).resolvedOptions();
     652    Object.keys(options).every(option => resolved[option] != null) is true
     653PASS
     654    var options = { month: "long", day: "numeric" };
     655    var resolved = Intl.DateTimeFormat("en-PH", options).resolvedOptions();
     656    Object.keys(options).every(option => resolved[option] != null) is true
     657PASS
     658    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     659    var resolved = Intl.DateTimeFormat("en-PH", options).resolvedOptions();
     660    Object.keys(options).every(option => resolved[option] != null) is true
     661PASS
     662    var options = { hour: "numeric", minute: "numeric" };
     663    var resolved = Intl.DateTimeFormat("en-PH", options).resolvedOptions();
     664    Object.keys(options).every(option => resolved[option] != null) is true
     665PASS
     666    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     667    var resolved = Intl.DateTimeFormat("en-US", options).resolvedOptions();
     668    Object.keys(options).every(option => resolved[option] != null) is true
     669PASS
     670    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     671    var resolved = Intl.DateTimeFormat("en-US", options).resolvedOptions();
     672    Object.keys(options).every(option => resolved[option] != null) is true
     673PASS
     674    var options = { year: "numeric", month: "long", day: "numeric" };
     675    var resolved = Intl.DateTimeFormat("en-US", options).resolvedOptions();
     676    Object.keys(options).every(option => resolved[option] != null) is true
     677PASS
     678    var options = { year: "numeric", month: "long" };
     679    var resolved = Intl.DateTimeFormat("en-US", options).resolvedOptions();
     680    Object.keys(options).every(option => resolved[option] != null) is true
     681PASS
     682    var options = { month: "long", day: "numeric" };
     683    var resolved = Intl.DateTimeFormat("en-US", options).resolvedOptions();
     684    Object.keys(options).every(option => resolved[option] != null) is true
     685PASS
     686    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     687    var resolved = Intl.DateTimeFormat("en-US", options).resolvedOptions();
     688    Object.keys(options).every(option => resolved[option] != null) is true
     689PASS
     690    var options = { hour: "numeric", minute: "numeric" };
     691    var resolved = Intl.DateTimeFormat("en-US", options).resolvedOptions();
     692    Object.keys(options).every(option => resolved[option] != null) is true
     693PASS
     694    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     695    var resolved = Intl.DateTimeFormat("el", options).resolvedOptions();
     696    Object.keys(options).every(option => resolved[option] != null) is true
     697PASS
     698    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     699    var resolved = Intl.DateTimeFormat("el", options).resolvedOptions();
     700    Object.keys(options).every(option => resolved[option] != null) is true
     701PASS
     702    var options = { year: "numeric", month: "long", day: "numeric" };
     703    var resolved = Intl.DateTimeFormat("el", options).resolvedOptions();
     704    Object.keys(options).every(option => resolved[option] != null) is true
     705PASS
     706    var options = { year: "numeric", month: "long" };
     707    var resolved = Intl.DateTimeFormat("el", options).resolvedOptions();
     708    Object.keys(options).every(option => resolved[option] != null) is true
     709PASS
     710    var options = { month: "long", day: "numeric" };
     711    var resolved = Intl.DateTimeFormat("el", options).resolvedOptions();
     712    Object.keys(options).every(option => resolved[option] != null) is true
     713PASS
     714    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     715    var resolved = Intl.DateTimeFormat("el", options).resolvedOptions();
     716    Object.keys(options).every(option => resolved[option] != null) is true
     717PASS
     718    var options = { hour: "numeric", minute: "numeric" };
     719    var resolved = Intl.DateTimeFormat("el", options).resolvedOptions();
     720    Object.keys(options).every(option => resolved[option] != null) is true
     721PASS
     722    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     723    var resolved = Intl.DateTimeFormat("es", options).resolvedOptions();
     724    Object.keys(options).every(option => resolved[option] != null) is true
     725PASS
     726    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     727    var resolved = Intl.DateTimeFormat("es", options).resolvedOptions();
     728    Object.keys(options).every(option => resolved[option] != null) is true
     729PASS
     730    var options = { year: "numeric", month: "long", day: "numeric" };
     731    var resolved = Intl.DateTimeFormat("es", options).resolvedOptions();
     732    Object.keys(options).every(option => resolved[option] != null) is true
     733PASS
     734    var options = { year: "numeric", month: "long" };
     735    var resolved = Intl.DateTimeFormat("es", options).resolvedOptions();
     736    Object.keys(options).every(option => resolved[option] != null) is true
     737PASS
     738    var options = { month: "long", day: "numeric" };
     739    var resolved = Intl.DateTimeFormat("es", options).resolvedOptions();
     740    Object.keys(options).every(option => resolved[option] != null) is true
     741PASS
     742    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     743    var resolved = Intl.DateTimeFormat("es", options).resolvedOptions();
     744    Object.keys(options).every(option => resolved[option] != null) is true
     745PASS
     746    var options = { hour: "numeric", minute: "numeric" };
     747    var resolved = Intl.DateTimeFormat("es", options).resolvedOptions();
     748    Object.keys(options).every(option => resolved[option] != null) is true
     749PASS
     750    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     751    var resolved = Intl.DateTimeFormat("es-MX", options).resolvedOptions();
     752    Object.keys(options).every(option => resolved[option] != null) is true
     753PASS
     754    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     755    var resolved = Intl.DateTimeFormat("es-MX", options).resolvedOptions();
     756    Object.keys(options).every(option => resolved[option] != null) is true
     757PASS
     758    var options = { year: "numeric", month: "long", day: "numeric" };
     759    var resolved = Intl.DateTimeFormat("es-MX", options).resolvedOptions();
     760    Object.keys(options).every(option => resolved[option] != null) is true
     761PASS
     762    var options = { year: "numeric", month: "long" };
     763    var resolved = Intl.DateTimeFormat("es-MX", options).resolvedOptions();
     764    Object.keys(options).every(option => resolved[option] != null) is true
     765PASS
     766    var options = { month: "long", day: "numeric" };
     767    var resolved = Intl.DateTimeFormat("es-MX", options).resolvedOptions();
     768    Object.keys(options).every(option => resolved[option] != null) is true
     769PASS
     770    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     771    var resolved = Intl.DateTimeFormat("es-MX", options).resolvedOptions();
     772    Object.keys(options).every(option => resolved[option] != null) is true
     773PASS
     774    var options = { hour: "numeric", minute: "numeric" };
     775    var resolved = Intl.DateTimeFormat("es-MX", options).resolvedOptions();
     776    Object.keys(options).every(option => resolved[option] != null) is true
     777PASS
     778    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     779    var resolved = Intl.DateTimeFormat("es-PR", options).resolvedOptions();
     780    Object.keys(options).every(option => resolved[option] != null) is true
     781PASS
     782    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     783    var resolved = Intl.DateTimeFormat("es-PR", options).resolvedOptions();
     784    Object.keys(options).every(option => resolved[option] != null) is true
     785PASS
     786    var options = { year: "numeric", month: "long", day: "numeric" };
     787    var resolved = Intl.DateTimeFormat("es-PR", options).resolvedOptions();
     788    Object.keys(options).every(option => resolved[option] != null) is true
     789PASS
     790    var options = { year: "numeric", month: "long" };
     791    var resolved = Intl.DateTimeFormat("es-PR", options).resolvedOptions();
     792    Object.keys(options).every(option => resolved[option] != null) is true
     793PASS
     794    var options = { month: "long", day: "numeric" };
     795    var resolved = Intl.DateTimeFormat("es-PR", options).resolvedOptions();
     796    Object.keys(options).every(option => resolved[option] != null) is true
     797PASS
     798    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     799    var resolved = Intl.DateTimeFormat("es-PR", options).resolvedOptions();
     800    Object.keys(options).every(option => resolved[option] != null) is true
     801PASS
     802    var options = { hour: "numeric", minute: "numeric" };
     803    var resolved = Intl.DateTimeFormat("es-PR", options).resolvedOptions();
     804    Object.keys(options).every(option => resolved[option] != null) is true
     805PASS
     806    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     807    var resolved = Intl.DateTimeFormat("fr", options).resolvedOptions();
     808    Object.keys(options).every(option => resolved[option] != null) is true
     809PASS
     810    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     811    var resolved = Intl.DateTimeFormat("fr", options).resolvedOptions();
     812    Object.keys(options).every(option => resolved[option] != null) is true
     813PASS
     814    var options = { year: "numeric", month: "long", day: "numeric" };
     815    var resolved = Intl.DateTimeFormat("fr", options).resolvedOptions();
     816    Object.keys(options).every(option => resolved[option] != null) is true
     817PASS
     818    var options = { year: "numeric", month: "long" };
     819    var resolved = Intl.DateTimeFormat("fr", options).resolvedOptions();
     820    Object.keys(options).every(option => resolved[option] != null) is true
     821PASS
     822    var options = { month: "long", day: "numeric" };
     823    var resolved = Intl.DateTimeFormat("fr", options).resolvedOptions();
     824    Object.keys(options).every(option => resolved[option] != null) is true
     825PASS
     826    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     827    var resolved = Intl.DateTimeFormat("fr", options).resolvedOptions();
     828    Object.keys(options).every(option => resolved[option] != null) is true
     829PASS
     830    var options = { hour: "numeric", minute: "numeric" };
     831    var resolved = Intl.DateTimeFormat("fr", options).resolvedOptions();
     832    Object.keys(options).every(option => resolved[option] != null) is true
     833PASS
     834    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     835    var resolved = Intl.DateTimeFormat("fr-CA", options).resolvedOptions();
     836    Object.keys(options).every(option => resolved[option] != null) is true
     837PASS
     838    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     839    var resolved = Intl.DateTimeFormat("fr-CA", options).resolvedOptions();
     840    Object.keys(options).every(option => resolved[option] != null) is true
     841PASS
     842    var options = { year: "numeric", month: "long", day: "numeric" };
     843    var resolved = Intl.DateTimeFormat("fr-CA", options).resolvedOptions();
     844    Object.keys(options).every(option => resolved[option] != null) is true
     845PASS
     846    var options = { year: "numeric", month: "long" };
     847    var resolved = Intl.DateTimeFormat("fr-CA", options).resolvedOptions();
     848    Object.keys(options).every(option => resolved[option] != null) is true
     849PASS
     850    var options = { month: "long", day: "numeric" };
     851    var resolved = Intl.DateTimeFormat("fr-CA", options).resolvedOptions();
     852    Object.keys(options).every(option => resolved[option] != null) is true
     853PASS
     854    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     855    var resolved = Intl.DateTimeFormat("fr-CA", options).resolvedOptions();
     856    Object.keys(options).every(option => resolved[option] != null) is true
     857PASS
     858    var options = { hour: "numeric", minute: "numeric" };
     859    var resolved = Intl.DateTimeFormat("fr-CA", options).resolvedOptions();
     860    Object.keys(options).every(option => resolved[option] != null) is true
     861PASS
     862    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     863    var resolved = Intl.DateTimeFormat("ga", options).resolvedOptions();
     864    Object.keys(options).every(option => resolved[option] != null) is true
     865PASS
     866    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     867    var resolved = Intl.DateTimeFormat("ga", options).resolvedOptions();
     868    Object.keys(options).every(option => resolved[option] != null) is true
     869PASS
     870    var options = { year: "numeric", month: "long", day: "numeric" };
     871    var resolved = Intl.DateTimeFormat("ga", options).resolvedOptions();
     872    Object.keys(options).every(option => resolved[option] != null) is true
     873PASS
     874    var options = { year: "numeric", month: "long" };
     875    var resolved = Intl.DateTimeFormat("ga", options).resolvedOptions();
     876    Object.keys(options).every(option => resolved[option] != null) is true
     877PASS
     878    var options = { month: "long", day: "numeric" };
     879    var resolved = Intl.DateTimeFormat("ga", options).resolvedOptions();
     880    Object.keys(options).every(option => resolved[option] != null) is true
     881PASS
     882    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     883    var resolved = Intl.DateTimeFormat("ga", options).resolvedOptions();
     884    Object.keys(options).every(option => resolved[option] != null) is true
     885PASS
     886    var options = { hour: "numeric", minute: "numeric" };
     887    var resolved = Intl.DateTimeFormat("ga", options).resolvedOptions();
     888    Object.keys(options).every(option => resolved[option] != null) is true
     889PASS
     890    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     891    var resolved = Intl.DateTimeFormat("hi-IN", options).resolvedOptions();
     892    Object.keys(options).every(option => resolved[option] != null) is true
     893PASS
     894    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     895    var resolved = Intl.DateTimeFormat("hi-IN", options).resolvedOptions();
     896    Object.keys(options).every(option => resolved[option] != null) is true
     897PASS
     898    var options = { year: "numeric", month: "long", day: "numeric" };
     899    var resolved = Intl.DateTimeFormat("hi-IN", options).resolvedOptions();
     900    Object.keys(options).every(option => resolved[option] != null) is true
     901PASS
     902    var options = { year: "numeric", month: "long" };
     903    var resolved = Intl.DateTimeFormat("hi-IN", options).resolvedOptions();
     904    Object.keys(options).every(option => resolved[option] != null) is true
     905PASS
     906    var options = { month: "long", day: "numeric" };
     907    var resolved = Intl.DateTimeFormat("hi-IN", options).resolvedOptions();
     908    Object.keys(options).every(option => resolved[option] != null) is true
     909PASS
     910    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     911    var resolved = Intl.DateTimeFormat("hi-IN", options).resolvedOptions();
     912    Object.keys(options).every(option => resolved[option] != null) is true
     913PASS
     914    var options = { hour: "numeric", minute: "numeric" };
     915    var resolved = Intl.DateTimeFormat("hi-IN", options).resolvedOptions();
     916    Object.keys(options).every(option => resolved[option] != null) is true
     917PASS
     918    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     919    var resolved = Intl.DateTimeFormat("is", options).resolvedOptions();
     920    Object.keys(options).every(option => resolved[option] != null) is true
     921PASS
     922    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     923    var resolved = Intl.DateTimeFormat("is", options).resolvedOptions();
     924    Object.keys(options).every(option => resolved[option] != null) is true
     925PASS
     926    var options = { year: "numeric", month: "long", day: "numeric" };
     927    var resolved = Intl.DateTimeFormat("is", options).resolvedOptions();
     928    Object.keys(options).every(option => resolved[option] != null) is true
     929PASS
     930    var options = { year: "numeric", month: "long" };
     931    var resolved = Intl.DateTimeFormat("is", options).resolvedOptions();
     932    Object.keys(options).every(option => resolved[option] != null) is true
     933PASS
     934    var options = { month: "long", day: "numeric" };
     935    var resolved = Intl.DateTimeFormat("is", options).resolvedOptions();
     936    Object.keys(options).every(option => resolved[option] != null) is true
     937PASS
     938    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     939    var resolved = Intl.DateTimeFormat("is", options).resolvedOptions();
     940    Object.keys(options).every(option => resolved[option] != null) is true
     941PASS
     942    var options = { hour: "numeric", minute: "numeric" };
     943    var resolved = Intl.DateTimeFormat("is", options).resolvedOptions();
     944    Object.keys(options).every(option => resolved[option] != null) is true
     945PASS
     946    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     947    var resolved = Intl.DateTimeFormat("it", options).resolvedOptions();
     948    Object.keys(options).every(option => resolved[option] != null) is true
     949PASS
     950    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     951    var resolved = Intl.DateTimeFormat("it", options).resolvedOptions();
     952    Object.keys(options).every(option => resolved[option] != null) is true
     953PASS
     954    var options = { year: "numeric", month: "long", day: "numeric" };
     955    var resolved = Intl.DateTimeFormat("it", options).resolvedOptions();
     956    Object.keys(options).every(option => resolved[option] != null) is true
     957PASS
     958    var options = { year: "numeric", month: "long" };
     959    var resolved = Intl.DateTimeFormat("it", options).resolvedOptions();
     960    Object.keys(options).every(option => resolved[option] != null) is true
     961PASS
     962    var options = { month: "long", day: "numeric" };
     963    var resolved = Intl.DateTimeFormat("it", options).resolvedOptions();
     964    Object.keys(options).every(option => resolved[option] != null) is true
     965PASS
     966    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     967    var resolved = Intl.DateTimeFormat("it", options).resolvedOptions();
     968    Object.keys(options).every(option => resolved[option] != null) is true
     969PASS
     970    var options = { hour: "numeric", minute: "numeric" };
     971    var resolved = Intl.DateTimeFormat("it", options).resolvedOptions();
     972    Object.keys(options).every(option => resolved[option] != null) is true
     973PASS
     974    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     975    var resolved = Intl.DateTimeFormat("iw", options).resolvedOptions();
     976    Object.keys(options).every(option => resolved[option] != null) is true
     977PASS
     978    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     979    var resolved = Intl.DateTimeFormat("iw", options).resolvedOptions();
     980    Object.keys(options).every(option => resolved[option] != null) is true
     981PASS
     982    var options = { year: "numeric", month: "long", day: "numeric" };
     983    var resolved = Intl.DateTimeFormat("iw", options).resolvedOptions();
     984    Object.keys(options).every(option => resolved[option] != null) is true
     985PASS
     986    var options = { year: "numeric", month: "long" };
     987    var resolved = Intl.DateTimeFormat("iw", options).resolvedOptions();
     988    Object.keys(options).every(option => resolved[option] != null) is true
     989PASS
     990    var options = { month: "long", day: "numeric" };
     991    var resolved = Intl.DateTimeFormat("iw", options).resolvedOptions();
     992    Object.keys(options).every(option => resolved[option] != null) is true
     993PASS
     994    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     995    var resolved = Intl.DateTimeFormat("iw", options).resolvedOptions();
     996    Object.keys(options).every(option => resolved[option] != null) is true
     997PASS
     998    var options = { hour: "numeric", minute: "numeric" };
     999    var resolved = Intl.DateTimeFormat("iw", options).resolvedOptions();
     1000    Object.keys(options).every(option => resolved[option] != null) is true
     1001PASS
     1002    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1003    var resolved = Intl.DateTimeFormat("ja", options).resolvedOptions();
     1004    Object.keys(options).every(option => resolved[option] != null) is true
     1005PASS
     1006    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1007    var resolved = Intl.DateTimeFormat("ja", options).resolvedOptions();
     1008    Object.keys(options).every(option => resolved[option] != null) is true
     1009PASS
     1010    var options = { year: "numeric", month: "long", day: "numeric" };
     1011    var resolved = Intl.DateTimeFormat("ja", options).resolvedOptions();
     1012    Object.keys(options).every(option => resolved[option] != null) is true
     1013PASS
     1014    var options = { year: "numeric", month: "long" };
     1015    var resolved = Intl.DateTimeFormat("ja", options).resolvedOptions();
     1016    Object.keys(options).every(option => resolved[option] != null) is true
     1017PASS
     1018    var options = { month: "long", day: "numeric" };
     1019    var resolved = Intl.DateTimeFormat("ja", options).resolvedOptions();
     1020    Object.keys(options).every(option => resolved[option] != null) is true
     1021PASS
     1022    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1023    var resolved = Intl.DateTimeFormat("ja", options).resolvedOptions();
     1024    Object.keys(options).every(option => resolved[option] != null) is true
     1025PASS
     1026    var options = { hour: "numeric", minute: "numeric" };
     1027    var resolved = Intl.DateTimeFormat("ja", options).resolvedOptions();
     1028    Object.keys(options).every(option => resolved[option] != null) is true
     1029PASS
     1030    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1031    var resolved = Intl.DateTimeFormat("ko-KR", options).resolvedOptions();
     1032    Object.keys(options).every(option => resolved[option] != null) is true
     1033PASS
     1034    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1035    var resolved = Intl.DateTimeFormat("ko-KR", options).resolvedOptions();
     1036    Object.keys(options).every(option => resolved[option] != null) is true
     1037PASS
     1038    var options = { year: "numeric", month: "long", day: "numeric" };
     1039    var resolved = Intl.DateTimeFormat("ko-KR", options).resolvedOptions();
     1040    Object.keys(options).every(option => resolved[option] != null) is true
     1041PASS
     1042    var options = { year: "numeric", month: "long" };
     1043    var resolved = Intl.DateTimeFormat("ko-KR", options).resolvedOptions();
     1044    Object.keys(options).every(option => resolved[option] != null) is true
     1045PASS
     1046    var options = { month: "long", day: "numeric" };
     1047    var resolved = Intl.DateTimeFormat("ko-KR", options).resolvedOptions();
     1048    Object.keys(options).every(option => resolved[option] != null) is true
     1049PASS
     1050    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1051    var resolved = Intl.DateTimeFormat("ko-KR", options).resolvedOptions();
     1052    Object.keys(options).every(option => resolved[option] != null) is true
     1053PASS
     1054    var options = { hour: "numeric", minute: "numeric" };
     1055    var resolved = Intl.DateTimeFormat("ko-KR", options).resolvedOptions();
     1056    Object.keys(options).every(option => resolved[option] != null) is true
     1057PASS
     1058    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1059    var resolved = Intl.DateTimeFormat("lt", options).resolvedOptions();
     1060    Object.keys(options).every(option => resolved[option] != null) is true
     1061PASS
     1062    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1063    var resolved = Intl.DateTimeFormat("lt", options).resolvedOptions();
     1064    Object.keys(options).every(option => resolved[option] != null) is true
     1065PASS
     1066    var options = { year: "numeric", month: "long", day: "numeric" };
     1067    var resolved = Intl.DateTimeFormat("lt", options).resolvedOptions();
     1068    Object.keys(options).every(option => resolved[option] != null) is true
     1069PASS
     1070    var options = { year: "numeric", month: "long" };
     1071    var resolved = Intl.DateTimeFormat("lt", options).resolvedOptions();
     1072    Object.keys(options).every(option => resolved[option] != null) is true
     1073PASS
     1074    var options = { month: "long", day: "numeric" };
     1075    var resolved = Intl.DateTimeFormat("lt", options).resolvedOptions();
     1076    Object.keys(options).every(option => resolved[option] != null) is true
     1077PASS
     1078    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1079    var resolved = Intl.DateTimeFormat("lt", options).resolvedOptions();
     1080    Object.keys(options).every(option => resolved[option] != null) is true
     1081PASS
     1082    var options = { hour: "numeric", minute: "numeric" };
     1083    var resolved = Intl.DateTimeFormat("lt", options).resolvedOptions();
     1084    Object.keys(options).every(option => resolved[option] != null) is true
     1085PASS
     1086    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1087    var resolved = Intl.DateTimeFormat("lv", options).resolvedOptions();
     1088    Object.keys(options).every(option => resolved[option] != null) is true
     1089PASS
     1090    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1091    var resolved = Intl.DateTimeFormat("lv", options).resolvedOptions();
     1092    Object.keys(options).every(option => resolved[option] != null) is true
     1093PASS
     1094    var options = { year: "numeric", month: "long", day: "numeric" };
     1095    var resolved = Intl.DateTimeFormat("lv", options).resolvedOptions();
     1096    Object.keys(options).every(option => resolved[option] != null) is true
     1097PASS
     1098    var options = { year: "numeric", month: "long" };
     1099    var resolved = Intl.DateTimeFormat("lv", options).resolvedOptions();
     1100    Object.keys(options).every(option => resolved[option] != null) is true
     1101PASS
     1102    var options = { month: "long", day: "numeric" };
     1103    var resolved = Intl.DateTimeFormat("lv", options).resolvedOptions();
     1104    Object.keys(options).every(option => resolved[option] != null) is true
     1105PASS
     1106    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1107    var resolved = Intl.DateTimeFormat("lv", options).resolvedOptions();
     1108    Object.keys(options).every(option => resolved[option] != null) is true
     1109PASS
     1110    var options = { hour: "numeric", minute: "numeric" };
     1111    var resolved = Intl.DateTimeFormat("lv", options).resolvedOptions();
     1112    Object.keys(options).every(option => resolved[option] != null) is true
     1113PASS
     1114    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1115    var resolved = Intl.DateTimeFormat("mk", options).resolvedOptions();
     1116    Object.keys(options).every(option => resolved[option] != null) is true
     1117PASS
     1118    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1119    var resolved = Intl.DateTimeFormat("mk", options).resolvedOptions();
     1120    Object.keys(options).every(option => resolved[option] != null) is true
     1121PASS
     1122    var options = { year: "numeric", month: "long", day: "numeric" };
     1123    var resolved = Intl.DateTimeFormat("mk", options).resolvedOptions();
     1124    Object.keys(options).every(option => resolved[option] != null) is true
     1125PASS
     1126    var options = { year: "numeric", month: "long" };
     1127    var resolved = Intl.DateTimeFormat("mk", options).resolvedOptions();
     1128    Object.keys(options).every(option => resolved[option] != null) is true
     1129PASS
     1130    var options = { month: "long", day: "numeric" };
     1131    var resolved = Intl.DateTimeFormat("mk", options).resolvedOptions();
     1132    Object.keys(options).every(option => resolved[option] != null) is true
     1133PASS
     1134    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1135    var resolved = Intl.DateTimeFormat("mk", options).resolvedOptions();
     1136    Object.keys(options).every(option => resolved[option] != null) is true
     1137PASS
     1138    var options = { hour: "numeric", minute: "numeric" };
     1139    var resolved = Intl.DateTimeFormat("mk", options).resolvedOptions();
     1140    Object.keys(options).every(option => resolved[option] != null) is true
     1141PASS
     1142    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1143    var resolved = Intl.DateTimeFormat("ms", options).resolvedOptions();
     1144    Object.keys(options).every(option => resolved[option] != null) is true
     1145PASS
     1146    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1147    var resolved = Intl.DateTimeFormat("ms", options).resolvedOptions();
     1148    Object.keys(options).every(option => resolved[option] != null) is true
     1149PASS
     1150    var options = { year: "numeric", month: "long", day: "numeric" };
     1151    var resolved = Intl.DateTimeFormat("ms", options).resolvedOptions();
     1152    Object.keys(options).every(option => resolved[option] != null) is true
     1153PASS
     1154    var options = { year: "numeric", month: "long" };
     1155    var resolved = Intl.DateTimeFormat("ms", options).resolvedOptions();
     1156    Object.keys(options).every(option => resolved[option] != null) is true
     1157PASS
     1158    var options = { month: "long", day: "numeric" };
     1159    var resolved = Intl.DateTimeFormat("ms", options).resolvedOptions();
     1160    Object.keys(options).every(option => resolved[option] != null) is true
     1161PASS
     1162    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1163    var resolved = Intl.DateTimeFormat("ms", options).resolvedOptions();
     1164    Object.keys(options).every(option => resolved[option] != null) is true
     1165PASS
     1166    var options = { hour: "numeric", minute: "numeric" };
     1167    var resolved = Intl.DateTimeFormat("ms", options).resolvedOptions();
     1168    Object.keys(options).every(option => resolved[option] != null) is true
     1169PASS
     1170    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1171    var resolved = Intl.DateTimeFormat("mt", options).resolvedOptions();
     1172    Object.keys(options).every(option => resolved[option] != null) is true
     1173PASS
     1174    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1175    var resolved = Intl.DateTimeFormat("mt", options).resolvedOptions();
     1176    Object.keys(options).every(option => resolved[option] != null) is true
     1177PASS
     1178    var options = { year: "numeric", month: "long", day: "numeric" };
     1179    var resolved = Intl.DateTimeFormat("mt", options).resolvedOptions();
     1180    Object.keys(options).every(option => resolved[option] != null) is true
     1181PASS
     1182    var options = { year: "numeric", month: "long" };
     1183    var resolved = Intl.DateTimeFormat("mt", options).resolvedOptions();
     1184    Object.keys(options).every(option => resolved[option] != null) is true
     1185PASS
     1186    var options = { month: "long", day: "numeric" };
     1187    var resolved = Intl.DateTimeFormat("mt", options).resolvedOptions();
     1188    Object.keys(options).every(option => resolved[option] != null) is true
     1189PASS
     1190    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1191    var resolved = Intl.DateTimeFormat("mt", options).resolvedOptions();
     1192    Object.keys(options).every(option => resolved[option] != null) is true
     1193PASS
     1194    var options = { hour: "numeric", minute: "numeric" };
     1195    var resolved = Intl.DateTimeFormat("mt", options).resolvedOptions();
     1196    Object.keys(options).every(option => resolved[option] != null) is true
     1197PASS
     1198    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1199    var resolved = Intl.DateTimeFormat("nb", options).resolvedOptions();
     1200    Object.keys(options).every(option => resolved[option] != null) is true
     1201PASS
     1202    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1203    var resolved = Intl.DateTimeFormat("nb", options).resolvedOptions();
     1204    Object.keys(options).every(option => resolved[option] != null) is true
     1205PASS
     1206    var options = { year: "numeric", month: "long", day: "numeric" };
     1207    var resolved = Intl.DateTimeFormat("nb", options).resolvedOptions();
     1208    Object.keys(options).every(option => resolved[option] != null) is true
     1209PASS
     1210    var options = { year: "numeric", month: "long" };
     1211    var resolved = Intl.DateTimeFormat("nb", options).resolvedOptions();
     1212    Object.keys(options).every(option => resolved[option] != null) is true
     1213PASS
     1214    var options = { month: "long", day: "numeric" };
     1215    var resolved = Intl.DateTimeFormat("nb", options).resolvedOptions();
     1216    Object.keys(options).every(option => resolved[option] != null) is true
     1217PASS
     1218    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1219    var resolved = Intl.DateTimeFormat("nb", options).resolvedOptions();
     1220    Object.keys(options).every(option => resolved[option] != null) is true
     1221PASS
     1222    var options = { hour: "numeric", minute: "numeric" };
     1223    var resolved = Intl.DateTimeFormat("nb", options).resolvedOptions();
     1224    Object.keys(options).every(option => resolved[option] != null) is true
     1225PASS
     1226    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1227    var resolved = Intl.DateTimeFormat("nl", options).resolvedOptions();
     1228    Object.keys(options).every(option => resolved[option] != null) is true
     1229PASS
     1230    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1231    var resolved = Intl.DateTimeFormat("nl", options).resolvedOptions();
     1232    Object.keys(options).every(option => resolved[option] != null) is true
     1233PASS
     1234    var options = { year: "numeric", month: "long", day: "numeric" };
     1235    var resolved = Intl.DateTimeFormat("nl", options).resolvedOptions();
     1236    Object.keys(options).every(option => resolved[option] != null) is true
     1237PASS
     1238    var options = { year: "numeric", month: "long" };
     1239    var resolved = Intl.DateTimeFormat("nl", options).resolvedOptions();
     1240    Object.keys(options).every(option => resolved[option] != null) is true
     1241PASS
     1242    var options = { month: "long", day: "numeric" };
     1243    var resolved = Intl.DateTimeFormat("nl", options).resolvedOptions();
     1244    Object.keys(options).every(option => resolved[option] != null) is true
     1245PASS
     1246    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1247    var resolved = Intl.DateTimeFormat("nl", options).resolvedOptions();
     1248    Object.keys(options).every(option => resolved[option] != null) is true
     1249PASS
     1250    var options = { hour: "numeric", minute: "numeric" };
     1251    var resolved = Intl.DateTimeFormat("nl", options).resolvedOptions();
     1252    Object.keys(options).every(option => resolved[option] != null) is true
     1253PASS
     1254    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1255    var resolved = Intl.DateTimeFormat("no", options).resolvedOptions();
     1256    Object.keys(options).every(option => resolved[option] != null) is true
     1257PASS
     1258    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1259    var resolved = Intl.DateTimeFormat("no", options).resolvedOptions();
     1260    Object.keys(options).every(option => resolved[option] != null) is true
     1261PASS
     1262    var options = { year: "numeric", month: "long", day: "numeric" };
     1263    var resolved = Intl.DateTimeFormat("no", options).resolvedOptions();
     1264    Object.keys(options).every(option => resolved[option] != null) is true
     1265PASS
     1266    var options = { year: "numeric", month: "long" };
     1267    var resolved = Intl.DateTimeFormat("no", options).resolvedOptions();
     1268    Object.keys(options).every(option => resolved[option] != null) is true
     1269PASS
     1270    var options = { month: "long", day: "numeric" };
     1271    var resolved = Intl.DateTimeFormat("no", options).resolvedOptions();
     1272    Object.keys(options).every(option => resolved[option] != null) is true
     1273PASS
     1274    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1275    var resolved = Intl.DateTimeFormat("no", options).resolvedOptions();
     1276    Object.keys(options).every(option => resolved[option] != null) is true
     1277PASS
     1278    var options = { hour: "numeric", minute: "numeric" };
     1279    var resolved = Intl.DateTimeFormat("no", options).resolvedOptions();
     1280    Object.keys(options).every(option => resolved[option] != null) is true
     1281PASS
     1282    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1283    var resolved = Intl.DateTimeFormat("pl", options).resolvedOptions();
     1284    Object.keys(options).every(option => resolved[option] != null) is true
     1285PASS
     1286    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1287    var resolved = Intl.DateTimeFormat("pl", options).resolvedOptions();
     1288    Object.keys(options).every(option => resolved[option] != null) is true
     1289PASS
     1290    var options = { year: "numeric", month: "long", day: "numeric" };
     1291    var resolved = Intl.DateTimeFormat("pl", options).resolvedOptions();
     1292    Object.keys(options).every(option => resolved[option] != null) is true
     1293PASS
     1294    var options = { year: "numeric", month: "long" };
     1295    var resolved = Intl.DateTimeFormat("pl", options).resolvedOptions();
     1296    Object.keys(options).every(option => resolved[option] != null) is true
     1297PASS
     1298    var options = { month: "long", day: "numeric" };
     1299    var resolved = Intl.DateTimeFormat("pl", options).resolvedOptions();
     1300    Object.keys(options).every(option => resolved[option] != null) is true
     1301PASS
     1302    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1303    var resolved = Intl.DateTimeFormat("pl", options).resolvedOptions();
     1304    Object.keys(options).every(option => resolved[option] != null) is true
     1305PASS
     1306    var options = { hour: "numeric", minute: "numeric" };
     1307    var resolved = Intl.DateTimeFormat("pl", options).resolvedOptions();
     1308    Object.keys(options).every(option => resolved[option] != null) is true
     1309PASS
     1310    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1311    var resolved = Intl.DateTimeFormat("pt", options).resolvedOptions();
     1312    Object.keys(options).every(option => resolved[option] != null) is true
     1313PASS
     1314    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1315    var resolved = Intl.DateTimeFormat("pt", options).resolvedOptions();
     1316    Object.keys(options).every(option => resolved[option] != null) is true
     1317PASS
     1318    var options = { year: "numeric", month: "long", day: "numeric" };
     1319    var resolved = Intl.DateTimeFormat("pt", options).resolvedOptions();
     1320    Object.keys(options).every(option => resolved[option] != null) is true
     1321PASS
     1322    var options = { year: "numeric", month: "long" };
     1323    var resolved = Intl.DateTimeFormat("pt", options).resolvedOptions();
     1324    Object.keys(options).every(option => resolved[option] != null) is true
     1325PASS
     1326    var options = { month: "long", day: "numeric" };
     1327    var resolved = Intl.DateTimeFormat("pt", options).resolvedOptions();
     1328    Object.keys(options).every(option => resolved[option] != null) is true
     1329PASS
     1330    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1331    var resolved = Intl.DateTimeFormat("pt", options).resolvedOptions();
     1332    Object.keys(options).every(option => resolved[option] != null) is true
     1333PASS
     1334    var options = { hour: "numeric", minute: "numeric" };
     1335    var resolved = Intl.DateTimeFormat("pt", options).resolvedOptions();
     1336    Object.keys(options).every(option => resolved[option] != null) is true
     1337PASS
     1338    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1339    var resolved = Intl.DateTimeFormat("pt-BR", options).resolvedOptions();
     1340    Object.keys(options).every(option => resolved[option] != null) is true
     1341PASS
     1342    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1343    var resolved = Intl.DateTimeFormat("pt-BR", options).resolvedOptions();
     1344    Object.keys(options).every(option => resolved[option] != null) is true
     1345PASS
     1346    var options = { year: "numeric", month: "long", day: "numeric" };
     1347    var resolved = Intl.DateTimeFormat("pt-BR", options).resolvedOptions();
     1348    Object.keys(options).every(option => resolved[option] != null) is true
     1349PASS
     1350    var options = { year: "numeric", month: "long" };
     1351    var resolved = Intl.DateTimeFormat("pt-BR", options).resolvedOptions();
     1352    Object.keys(options).every(option => resolved[option] != null) is true
     1353PASS
     1354    var options = { month: "long", day: "numeric" };
     1355    var resolved = Intl.DateTimeFormat("pt-BR", options).resolvedOptions();
     1356    Object.keys(options).every(option => resolved[option] != null) is true
     1357PASS
     1358    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1359    var resolved = Intl.DateTimeFormat("pt-BR", options).resolvedOptions();
     1360    Object.keys(options).every(option => resolved[option] != null) is true
     1361PASS
     1362    var options = { hour: "numeric", minute: "numeric" };
     1363    var resolved = Intl.DateTimeFormat("pt-BR", options).resolvedOptions();
     1364    Object.keys(options).every(option => resolved[option] != null) is true
     1365PASS
     1366    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1367    var resolved = Intl.DateTimeFormat("ro", options).resolvedOptions();
     1368    Object.keys(options).every(option => resolved[option] != null) is true
     1369PASS
     1370    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1371    var resolved = Intl.DateTimeFormat("ro", options).resolvedOptions();
     1372    Object.keys(options).every(option => resolved[option] != null) is true
     1373PASS
     1374    var options = { year: "numeric", month: "long", day: "numeric" };
     1375    var resolved = Intl.DateTimeFormat("ro", options).resolvedOptions();
     1376    Object.keys(options).every(option => resolved[option] != null) is true
     1377PASS
     1378    var options = { year: "numeric", month: "long" };
     1379    var resolved = Intl.DateTimeFormat("ro", options).resolvedOptions();
     1380    Object.keys(options).every(option => resolved[option] != null) is true
     1381PASS
     1382    var options = { month: "long", day: "numeric" };
     1383    var resolved = Intl.DateTimeFormat("ro", options).resolvedOptions();
     1384    Object.keys(options).every(option => resolved[option] != null) is true
     1385PASS
     1386    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1387    var resolved = Intl.DateTimeFormat("ro", options).resolvedOptions();
     1388    Object.keys(options).every(option => resolved[option] != null) is true
     1389PASS
     1390    var options = { hour: "numeric", minute: "numeric" };
     1391    var resolved = Intl.DateTimeFormat("ro", options).resolvedOptions();
     1392    Object.keys(options).every(option => resolved[option] != null) is true
     1393PASS
     1394    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1395    var resolved = Intl.DateTimeFormat("ru", options).resolvedOptions();
     1396    Object.keys(options).every(option => resolved[option] != null) is true
     1397PASS
     1398    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1399    var resolved = Intl.DateTimeFormat("ru", options).resolvedOptions();
     1400    Object.keys(options).every(option => resolved[option] != null) is true
     1401PASS
     1402    var options = { year: "numeric", month: "long", day: "numeric" };
     1403    var resolved = Intl.DateTimeFormat("ru", options).resolvedOptions();
     1404    Object.keys(options).every(option => resolved[option] != null) is true
     1405PASS
     1406    var options = { year: "numeric", month: "long" };
     1407    var resolved = Intl.DateTimeFormat("ru", options).resolvedOptions();
     1408    Object.keys(options).every(option => resolved[option] != null) is true
     1409PASS
     1410    var options = { month: "long", day: "numeric" };
     1411    var resolved = Intl.DateTimeFormat("ru", options).resolvedOptions();
     1412    Object.keys(options).every(option => resolved[option] != null) is true
     1413PASS
     1414    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1415    var resolved = Intl.DateTimeFormat("ru", options).resolvedOptions();
     1416    Object.keys(options).every(option => resolved[option] != null) is true
     1417PASS
     1418    var options = { hour: "numeric", minute: "numeric" };
     1419    var resolved = Intl.DateTimeFormat("ru", options).resolvedOptions();
     1420    Object.keys(options).every(option => resolved[option] != null) is true
     1421PASS
     1422    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1423    var resolved = Intl.DateTimeFormat("sk", options).resolvedOptions();
     1424    Object.keys(options).every(option => resolved[option] != null) is true
     1425PASS
     1426    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1427    var resolved = Intl.DateTimeFormat("sk", options).resolvedOptions();
     1428    Object.keys(options).every(option => resolved[option] != null) is true
     1429PASS
     1430    var options = { year: "numeric", month: "long", day: "numeric" };
     1431    var resolved = Intl.DateTimeFormat("sk", options).resolvedOptions();
     1432    Object.keys(options).every(option => resolved[option] != null) is true
     1433PASS
     1434    var options = { year: "numeric", month: "long" };
     1435    var resolved = Intl.DateTimeFormat("sk", options).resolvedOptions();
     1436    Object.keys(options).every(option => resolved[option] != null) is true
     1437PASS
     1438    var options = { month: "long", day: "numeric" };
     1439    var resolved = Intl.DateTimeFormat("sk", options).resolvedOptions();
     1440    Object.keys(options).every(option => resolved[option] != null) is true
     1441PASS
     1442    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1443    var resolved = Intl.DateTimeFormat("sk", options).resolvedOptions();
     1444    Object.keys(options).every(option => resolved[option] != null) is true
     1445PASS
     1446    var options = { hour: "numeric", minute: "numeric" };
     1447    var resolved = Intl.DateTimeFormat("sk", options).resolvedOptions();
     1448    Object.keys(options).every(option => resolved[option] != null) is true
     1449PASS
     1450    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1451    var resolved = Intl.DateTimeFormat("sl", options).resolvedOptions();
     1452    Object.keys(options).every(option => resolved[option] != null) is true
     1453PASS
     1454    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1455    var resolved = Intl.DateTimeFormat("sl", options).resolvedOptions();
     1456    Object.keys(options).every(option => resolved[option] != null) is true
     1457PASS
     1458    var options = { year: "numeric", month: "long", day: "numeric" };
     1459    var resolved = Intl.DateTimeFormat("sl", options).resolvedOptions();
     1460    Object.keys(options).every(option => resolved[option] != null) is true
     1461PASS
     1462    var options = { year: "numeric", month: "long" };
     1463    var resolved = Intl.DateTimeFormat("sl", options).resolvedOptions();
     1464    Object.keys(options).every(option => resolved[option] != null) is true
     1465PASS
     1466    var options = { month: "long", day: "numeric" };
     1467    var resolved = Intl.DateTimeFormat("sl", options).resolvedOptions();
     1468    Object.keys(options).every(option => resolved[option] != null) is true
     1469PASS
     1470    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1471    var resolved = Intl.DateTimeFormat("sl", options).resolvedOptions();
     1472    Object.keys(options).every(option => resolved[option] != null) is true
     1473PASS
     1474    var options = { hour: "numeric", minute: "numeric" };
     1475    var resolved = Intl.DateTimeFormat("sl", options).resolvedOptions();
     1476    Object.keys(options).every(option => resolved[option] != null) is true
     1477PASS
     1478    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1479    var resolved = Intl.DateTimeFormat("sr", options).resolvedOptions();
     1480    Object.keys(options).every(option => resolved[option] != null) is true
     1481PASS
     1482    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1483    var resolved = Intl.DateTimeFormat("sr", options).resolvedOptions();
     1484    Object.keys(options).every(option => resolved[option] != null) is true
     1485PASS
     1486    var options = { year: "numeric", month: "long", day: "numeric" };
     1487    var resolved = Intl.DateTimeFormat("sr", options).resolvedOptions();
     1488    Object.keys(options).every(option => resolved[option] != null) is true
     1489PASS
     1490    var options = { year: "numeric", month: "long" };
     1491    var resolved = Intl.DateTimeFormat("sr", options).resolvedOptions();
     1492    Object.keys(options).every(option => resolved[option] != null) is true
     1493PASS
     1494    var options = { month: "long", day: "numeric" };
     1495    var resolved = Intl.DateTimeFormat("sr", options).resolvedOptions();
     1496    Object.keys(options).every(option => resolved[option] != null) is true
     1497PASS
     1498    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1499    var resolved = Intl.DateTimeFormat("sr", options).resolvedOptions();
     1500    Object.keys(options).every(option => resolved[option] != null) is true
     1501PASS
     1502    var options = { hour: "numeric", minute: "numeric" };
     1503    var resolved = Intl.DateTimeFormat("sr", options).resolvedOptions();
     1504    Object.keys(options).every(option => resolved[option] != null) is true
     1505PASS
     1506    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1507    var resolved = Intl.DateTimeFormat("sv", options).resolvedOptions();
     1508    Object.keys(options).every(option => resolved[option] != null) is true
     1509PASS
     1510    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1511    var resolved = Intl.DateTimeFormat("sv", options).resolvedOptions();
     1512    Object.keys(options).every(option => resolved[option] != null) is true
     1513PASS
     1514    var options = { year: "numeric", month: "long", day: "numeric" };
     1515    var resolved = Intl.DateTimeFormat("sv", options).resolvedOptions();
     1516    Object.keys(options).every(option => resolved[option] != null) is true
     1517PASS
     1518    var options = { year: "numeric", month: "long" };
     1519    var resolved = Intl.DateTimeFormat("sv", options).resolvedOptions();
     1520    Object.keys(options).every(option => resolved[option] != null) is true
     1521PASS
     1522    var options = { month: "long", day: "numeric" };
     1523    var resolved = Intl.DateTimeFormat("sv", options).resolvedOptions();
     1524    Object.keys(options).every(option => resolved[option] != null) is true
     1525PASS
     1526    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1527    var resolved = Intl.DateTimeFormat("sv", options).resolvedOptions();
     1528    Object.keys(options).every(option => resolved[option] != null) is true
     1529PASS
     1530    var options = { hour: "numeric", minute: "numeric" };
     1531    var resolved = Intl.DateTimeFormat("sv", options).resolvedOptions();
     1532    Object.keys(options).every(option => resolved[option] != null) is true
     1533PASS
     1534    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1535    var resolved = Intl.DateTimeFormat("th", options).resolvedOptions();
     1536    Object.keys(options).every(option => resolved[option] != null) is true
     1537PASS
     1538    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1539    var resolved = Intl.DateTimeFormat("th", options).resolvedOptions();
     1540    Object.keys(options).every(option => resolved[option] != null) is true
     1541PASS
     1542    var options = { year: "numeric", month: "long", day: "numeric" };
     1543    var resolved = Intl.DateTimeFormat("th", options).resolvedOptions();
     1544    Object.keys(options).every(option => resolved[option] != null) is true
     1545PASS
     1546    var options = { year: "numeric", month: "long" };
     1547    var resolved = Intl.DateTimeFormat("th", options).resolvedOptions();
     1548    Object.keys(options).every(option => resolved[option] != null) is true
     1549PASS
     1550    var options = { month: "long", day: "numeric" };
     1551    var resolved = Intl.DateTimeFormat("th", options).resolvedOptions();
     1552    Object.keys(options).every(option => resolved[option] != null) is true
     1553PASS
     1554    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1555    var resolved = Intl.DateTimeFormat("th", options).resolvedOptions();
     1556    Object.keys(options).every(option => resolved[option] != null) is true
     1557PASS
     1558    var options = { hour: "numeric", minute: "numeric" };
     1559    var resolved = Intl.DateTimeFormat("th", options).resolvedOptions();
     1560    Object.keys(options).every(option => resolved[option] != null) is true
     1561PASS
     1562    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1563    var resolved = Intl.DateTimeFormat("tr", options).resolvedOptions();
     1564    Object.keys(options).every(option => resolved[option] != null) is true
     1565PASS
     1566    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1567    var resolved = Intl.DateTimeFormat("tr", options).resolvedOptions();
     1568    Object.keys(options).every(option => resolved[option] != null) is true
     1569PASS
     1570    var options = { year: "numeric", month: "long", day: "numeric" };
     1571    var resolved = Intl.DateTimeFormat("tr", options).resolvedOptions();
     1572    Object.keys(options).every(option => resolved[option] != null) is true
     1573PASS
     1574    var options = { year: "numeric", month: "long" };
     1575    var resolved = Intl.DateTimeFormat("tr", options).resolvedOptions();
     1576    Object.keys(options).every(option => resolved[option] != null) is true
     1577PASS
     1578    var options = { month: "long", day: "numeric" };
     1579    var resolved = Intl.DateTimeFormat("tr", options).resolvedOptions();
     1580    Object.keys(options).every(option => resolved[option] != null) is true
     1581PASS
     1582    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1583    var resolved = Intl.DateTimeFormat("tr", options).resolvedOptions();
     1584    Object.keys(options).every(option => resolved[option] != null) is true
     1585PASS
     1586    var options = { hour: "numeric", minute: "numeric" };
     1587    var resolved = Intl.DateTimeFormat("tr", options).resolvedOptions();
     1588    Object.keys(options).every(option => resolved[option] != null) is true
     1589PASS
     1590    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1591    var resolved = Intl.DateTimeFormat("uk", options).resolvedOptions();
     1592    Object.keys(options).every(option => resolved[option] != null) is true
     1593PASS
     1594    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1595    var resolved = Intl.DateTimeFormat("uk", options).resolvedOptions();
     1596    Object.keys(options).every(option => resolved[option] != null) is true
     1597PASS
     1598    var options = { year: "numeric", month: "long", day: "numeric" };
     1599    var resolved = Intl.DateTimeFormat("uk", options).resolvedOptions();
     1600    Object.keys(options).every(option => resolved[option] != null) is true
     1601PASS
     1602    var options = { year: "numeric", month: "long" };
     1603    var resolved = Intl.DateTimeFormat("uk", options).resolvedOptions();
     1604    Object.keys(options).every(option => resolved[option] != null) is true
     1605PASS
     1606    var options = { month: "long", day: "numeric" };
     1607    var resolved = Intl.DateTimeFormat("uk", options).resolvedOptions();
     1608    Object.keys(options).every(option => resolved[option] != null) is true
     1609PASS
     1610    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1611    var resolved = Intl.DateTimeFormat("uk", options).resolvedOptions();
     1612    Object.keys(options).every(option => resolved[option] != null) is true
     1613PASS
     1614    var options = { hour: "numeric", minute: "numeric" };
     1615    var resolved = Intl.DateTimeFormat("uk", options).resolvedOptions();
     1616    Object.keys(options).every(option => resolved[option] != null) is true
     1617PASS
     1618    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1619    var resolved = Intl.DateTimeFormat("vi", options).resolvedOptions();
     1620    Object.keys(options).every(option => resolved[option] != null) is true
     1621PASS
     1622    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1623    var resolved = Intl.DateTimeFormat("vi", options).resolvedOptions();
     1624    Object.keys(options).every(option => resolved[option] != null) is true
     1625PASS
     1626    var options = { year: "numeric", month: "long", day: "numeric" };
     1627    var resolved = Intl.DateTimeFormat("vi", options).resolvedOptions();
     1628    Object.keys(options).every(option => resolved[option] != null) is true
     1629PASS
     1630    var options = { year: "numeric", month: "long" };
     1631    var resolved = Intl.DateTimeFormat("vi", options).resolvedOptions();
     1632    Object.keys(options).every(option => resolved[option] != null) is true
     1633PASS
     1634    var options = { month: "long", day: "numeric" };
     1635    var resolved = Intl.DateTimeFormat("vi", options).resolvedOptions();
     1636    Object.keys(options).every(option => resolved[option] != null) is true
     1637PASS
     1638    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1639    var resolved = Intl.DateTimeFormat("vi", options).resolvedOptions();
     1640    Object.keys(options).every(option => resolved[option] != null) is true
     1641PASS
     1642    var options = { hour: "numeric", minute: "numeric" };
     1643    var resolved = Intl.DateTimeFormat("vi", options).resolvedOptions();
     1644    Object.keys(options).every(option => resolved[option] != null) is true
     1645PASS
     1646    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1647    var resolved = Intl.DateTimeFormat("zh", options).resolvedOptions();
     1648    Object.keys(options).every(option => resolved[option] != null) is true
     1649PASS
     1650    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1651    var resolved = Intl.DateTimeFormat("zh", options).resolvedOptions();
     1652    Object.keys(options).every(option => resolved[option] != null) is true
     1653PASS
     1654    var options = { year: "numeric", month: "long", day: "numeric" };
     1655    var resolved = Intl.DateTimeFormat("zh", options).resolvedOptions();
     1656    Object.keys(options).every(option => resolved[option] != null) is true
     1657PASS
     1658    var options = { year: "numeric", month: "long" };
     1659    var resolved = Intl.DateTimeFormat("zh", options).resolvedOptions();
     1660    Object.keys(options).every(option => resolved[option] != null) is true
     1661PASS
     1662    var options = { month: "long", day: "numeric" };
     1663    var resolved = Intl.DateTimeFormat("zh", options).resolvedOptions();
     1664    Object.keys(options).every(option => resolved[option] != null) is true
     1665PASS
     1666    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1667    var resolved = Intl.DateTimeFormat("zh", options).resolvedOptions();
     1668    Object.keys(options).every(option => resolved[option] != null) is true
     1669PASS
     1670    var options = { hour: "numeric", minute: "numeric" };
     1671    var resolved = Intl.DateTimeFormat("zh", options).resolvedOptions();
     1672    Object.keys(options).every(option => resolved[option] != null) is true
     1673PASS
     1674    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1675    var resolved = Intl.DateTimeFormat("zh-CN", options).resolvedOptions();
     1676    Object.keys(options).every(option => resolved[option] != null) is true
     1677PASS
     1678    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1679    var resolved = Intl.DateTimeFormat("zh-CN", options).resolvedOptions();
     1680    Object.keys(options).every(option => resolved[option] != null) is true
     1681PASS
     1682    var options = { year: "numeric", month: "long", day: "numeric" };
     1683    var resolved = Intl.DateTimeFormat("zh-CN", options).resolvedOptions();
     1684    Object.keys(options).every(option => resolved[option] != null) is true
     1685PASS
     1686    var options = { year: "numeric", month: "long" };
     1687    var resolved = Intl.DateTimeFormat("zh-CN", options).resolvedOptions();
     1688    Object.keys(options).every(option => resolved[option] != null) is true
     1689PASS
     1690    var options = { month: "long", day: "numeric" };
     1691    var resolved = Intl.DateTimeFormat("zh-CN", options).resolvedOptions();
     1692    Object.keys(options).every(option => resolved[option] != null) is true
     1693PASS
     1694    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1695    var resolved = Intl.DateTimeFormat("zh-CN", options).resolvedOptions();
     1696    Object.keys(options).every(option => resolved[option] != null) is true
     1697PASS
     1698    var options = { hour: "numeric", minute: "numeric" };
     1699    var resolved = Intl.DateTimeFormat("zh-CN", options).resolvedOptions();
     1700    Object.keys(options).every(option => resolved[option] != null) is true
     1701PASS
     1702    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1703    var resolved = Intl.DateTimeFormat("zh-Hant-HK", options).resolvedOptions();
     1704    Object.keys(options).every(option => resolved[option] != null) is true
     1705PASS
     1706    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1707    var resolved = Intl.DateTimeFormat("zh-Hant-HK", options).resolvedOptions();
     1708    Object.keys(options).every(option => resolved[option] != null) is true
     1709PASS
     1710    var options = { year: "numeric", month: "long", day: "numeric" };
     1711    var resolved = Intl.DateTimeFormat("zh-Hant-HK", options).resolvedOptions();
     1712    Object.keys(options).every(option => resolved[option] != null) is true
     1713PASS
     1714    var options = { year: "numeric", month: "long" };
     1715    var resolved = Intl.DateTimeFormat("zh-Hant-HK", options).resolvedOptions();
     1716    Object.keys(options).every(option => resolved[option] != null) is true
     1717PASS
     1718    var options = { month: "long", day: "numeric" };
     1719    var resolved = Intl.DateTimeFormat("zh-Hant-HK", options).resolvedOptions();
     1720    Object.keys(options).every(option => resolved[option] != null) is true
     1721PASS
     1722    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1723    var resolved = Intl.DateTimeFormat("zh-Hant-HK", options).resolvedOptions();
     1724    Object.keys(options).every(option => resolved[option] != null) is true
     1725PASS
     1726    var options = { hour: "numeric", minute: "numeric" };
     1727    var resolved = Intl.DateTimeFormat("zh-Hant-HK", options).resolvedOptions();
     1728    Object.keys(options).every(option => resolved[option] != null) is true
     1729PASS
     1730    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     1731    var resolved = Intl.DateTimeFormat("zh-TW", options).resolvedOptions();
     1732    Object.keys(options).every(option => resolved[option] != null) is true
     1733PASS
     1734    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     1735    var resolved = Intl.DateTimeFormat("zh-TW", options).resolvedOptions();
     1736    Object.keys(options).every(option => resolved[option] != null) is true
     1737PASS
     1738    var options = { year: "numeric", month: "long", day: "numeric" };
     1739    var resolved = Intl.DateTimeFormat("zh-TW", options).resolvedOptions();
     1740    Object.keys(options).every(option => resolved[option] != null) is true
     1741PASS
     1742    var options = { year: "numeric", month: "long" };
     1743    var resolved = Intl.DateTimeFormat("zh-TW", options).resolvedOptions();
     1744    Object.keys(options).every(option => resolved[option] != null) is true
     1745PASS
     1746    var options = { month: "long", day: "numeric" };
     1747    var resolved = Intl.DateTimeFormat("zh-TW", options).resolvedOptions();
     1748    Object.keys(options).every(option => resolved[option] != null) is true
     1749PASS
     1750    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     1751    var resolved = Intl.DateTimeFormat("zh-TW", options).resolvedOptions();
     1752    Object.keys(options).every(option => resolved[option] != null) is true
     1753PASS
     1754    var options = { hour: "numeric", minute: "numeric" };
     1755    var resolved = Intl.DateTimeFormat("zh-TW", options).resolvedOptions();
     1756    Object.keys(options).every(option => resolved[option] != null) is true
    681757PASS successfullyParsed is true
    691758
  • trunk/LayoutTests/js/script-tests/intl-datetimeformat.js

    r189811 r194387  
    120120
    121121// 1. If x is not a finite Number, then throw a RangeError exception.
    122 shouldThrow("Intl.DateTimeFormat.prototype.format(Infinity)", "'RangeError: date value is not finite in DateTimeFormat.format()'");
     122shouldThrow("Intl.DateTimeFormat.prototype.format(Infinity)", "'RangeError: date value is not finite in DateTimeFormat format()'");
    123123
    124124// Format is bound, so calling with alternate "this" has no effect.
     
    137137shouldBeType("Intl.DateTimeFormat.prototype.resolvedOptions()", "Object");
    138138
     139// The Intl.DateTimeFormat prototype object is itself an %DateTimeFormat% instance, whose internal slots are set as if it had been constructed by the expression Construct(%DateTimeFormat%).
     140shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().locale", "new Intl.DateTimeFormat().resolvedOptions().locale");
     141shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().timeZone", "new Intl.DateTimeFormat().resolvedOptions().timeZone");
     142shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().calendar", "new Intl.DateTimeFormat().resolvedOptions().calendar");
     143shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().numberingSystem", "new Intl.DateTimeFormat().resolvedOptions().numberingSystem");
     144shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().weekday", "new Intl.DateTimeFormat().resolvedOptions().weekday");
     145shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().era", "new Intl.DateTimeFormat().resolvedOptions().era");
     146shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().year", "new Intl.DateTimeFormat().resolvedOptions().year");
     147shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().month", "new Intl.DateTimeFormat().resolvedOptions().month");
     148shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().day", "new Intl.DateTimeFormat().resolvedOptions().day");
     149shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().hour", "new Intl.DateTimeFormat().resolvedOptions().hour");
     150shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().hour12", "new Intl.DateTimeFormat().resolvedOptions().hour12");
     151shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().minute", "new Intl.DateTimeFormat().resolvedOptions().minute");
     152shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().second", "new Intl.DateTimeFormat().resolvedOptions().second");
     153shouldBe("Intl.DateTimeFormat.prototype.resolvedOptions().timeZoneName", "new Intl.DateTimeFormat().resolvedOptions().timeZoneName");
     154
    139155// Returns a new object each time.
    140156shouldBeFalse("Intl.DateTimeFormat.prototype.resolvedOptions() === Intl.DateTimeFormat.prototype.resolvedOptions()");
     
    143159shouldThrow("Intl.DateTimeFormat.prototype.resolvedOptions.call(5)", "'TypeError: Intl.DateTimeFormat.prototype.resolvedOptions called on value that\\'s not an object initialized as a DateTimeFormat'");
    144160
     161shouldThrow("Intl.DateTimeFormat('$')", "'RangeError: invalid language tag: $'");
     162shouldNotThrow("Intl.DateTimeFormat('en', null)");
     163
     164// Defaults to month, day, year.
     165shouldBe("Intl.DateTimeFormat('en').resolvedOptions().weekday", "undefined");
     166shouldBe("Intl.DateTimeFormat('en').resolvedOptions().era", "undefined");
     167shouldBe("Intl.DateTimeFormat('en').resolvedOptions().month", "'numeric'");
     168shouldBe("Intl.DateTimeFormat('en').resolvedOptions().day", "'numeric'");
     169shouldBe("Intl.DateTimeFormat('en').resolvedOptions().year", "'numeric'");
     170shouldBe("Intl.DateTimeFormat('en').resolvedOptions().hour", "undefined");
     171shouldBe("Intl.DateTimeFormat('en').resolvedOptions().hour12", "undefined");
     172shouldBe("Intl.DateTimeFormat('en').resolvedOptions().minute", "undefined");
     173shouldBe("Intl.DateTimeFormat('en').resolvedOptions().second", "undefined");
     174shouldBe("Intl.DateTimeFormat('en').resolvedOptions().timeZoneName", "undefined");
     175
     176shouldThrow("Intl.DateTimeFormat('en', { localeMatcher: { toString() { throw 'nope' } } })", "'nope'");
     177shouldThrow("Intl.DateTimeFormat('en', { localeMatcher:'bad' })", '\'RangeError: localeMatcher must be either "lookup" or "best fit"\'');
     178shouldNotThrow("Intl.DateTimeFormat('en', { localeMatcher:'lookup' })");
     179shouldNotThrow("Intl.DateTimeFormat('en', { localeMatcher:'best fit' })");
     180
     181shouldThrow("Intl.DateTimeFormat('en', { formatMatcher: { toString() { throw 'nope' } } })", "'nope'");
     182shouldThrow("Intl.DateTimeFormat('en', { formatMatcher:'bad' })", '\'RangeError: formatMatcher must be either "basic" or "best fit"\'');
     183shouldNotThrow("Intl.DateTimeFormat('en', { formatMatcher:'basic' })");
     184shouldNotThrow("Intl.DateTimeFormat('en', { formatMatcher:'best fit' })");
     185
     186shouldThrow("Intl.DateTimeFormat('en', { timeZone: 'nowhere/bogus' })", "'RangeError: invalid time zone: nowhere/bogus'");
     187shouldThrow("Intl.DateTimeFormat('en', { timeZone: { toString() { throw 'nope' } } })", "'nope'");
     188
     189// Time zone is case insensitive.
     190shouldBe("Intl.DateTimeFormat('en', { timeZone: 'america/denver' }).resolvedOptions().timeZone", "'America/Denver'");
     191shouldBe("Intl.DateTimeFormat('en', { timeZone: 'AMERICA/LOS_ANGELES' }).resolvedOptions().timeZone", "'America/Los_Angeles'");
     192
     193// Default time zone is a valid canonical time zone.
     194shouldBe("Intl.DateTimeFormat('en', { timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone }).resolvedOptions().timeZone", "Intl.DateTimeFormat().resolvedOptions().timeZone");
     195
     196// Time zone is canonicalized for obsolete links in IANA tz backward file.
     197shouldBe("Intl.DateTimeFormat('en', { timeZone: 'America/Atka' }).resolvedOptions().timeZone", "'America/Adak'");
     198shouldBe("Intl.DateTimeFormat('en', { timeZone: 'America/Ensenada' }).resolvedOptions().timeZone", "'America/Tijuana'");
     199shouldBe("Intl.DateTimeFormat('en', { timeZone: 'America/Porto_Acre' }).resolvedOptions().timeZone", "'America/Rio_Branco'");
     200shouldBe("Intl.DateTimeFormat('en', { timeZone: 'America/Shiprock' }).resolvedOptions().timeZone", "'America/Denver'");
     201shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Antarctica/South_Pole' }).resolvedOptions().timeZone", "'Pacific/Auckland'");
     202shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Ashkhabad' }).resolvedOptions().timeZone", "'Asia/Ashgabat'");
     203shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Chongqing' }).resolvedOptions().timeZone", "'Asia/Shanghai'");
     204shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Chungking' }).resolvedOptions().timeZone", "'Asia/Shanghai'");
     205shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Dacca' }).resolvedOptions().timeZone", "'Asia/Dhaka'");
     206shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Harbin' }).resolvedOptions().timeZone", "'Asia/Shanghai'");
     207shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Kashgar' }).resolvedOptions().timeZone", "'Asia/Urumqi'");
     208shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Macao' }).resolvedOptions().timeZone", "'Asia/Macau'");
     209shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Tel_Aviv' }).resolvedOptions().timeZone", "'Asia/Jerusalem'");
     210shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Thimbu' }).resolvedOptions().timeZone", "'Asia/Thimphu'");
     211shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Ujung_Pandang' }).resolvedOptions().timeZone", "'Asia/Makassar'");
     212shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Asia/Ulan_Bator' }).resolvedOptions().timeZone", "'Asia/Ulaanbaatar'");
     213shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/ACT' }).resolvedOptions().timeZone", "'Australia/Sydney'");
     214shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/Canberra' }).resolvedOptions().timeZone", "'Australia/Sydney'");
     215shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/LHI' }).resolvedOptions().timeZone", "'Australia/Lord_Howe'");
     216shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/NSW' }).resolvedOptions().timeZone", "'Australia/Sydney'");
     217shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/North' }).resolvedOptions().timeZone", "'Australia/Darwin'");
     218shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/Queensland' }).resolvedOptions().timeZone", "'Australia/Brisbane'");
     219shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/South' }).resolvedOptions().timeZone", "'Australia/Adelaide'");
     220shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/Tasmania' }).resolvedOptions().timeZone", "'Australia/Hobart'");
     221shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/Victoria' }).resolvedOptions().timeZone", "'Australia/Melbourne'");
     222shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/West' }).resolvedOptions().timeZone", "'Australia/Perth'");
     223shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Australia/Yancowinna' }).resolvedOptions().timeZone", "'Australia/Broken_Hill'");
     224shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Brazil/Acre' }).resolvedOptions().timeZone", "'America/Rio_Branco'");
     225shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Brazil/DeNoronha' }).resolvedOptions().timeZone", "'America/Noronha'");
     226shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Brazil/East' }).resolvedOptions().timeZone", "'America/Sao_Paulo'");
     227shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Brazil/West' }).resolvedOptions().timeZone", "'America/Manaus'");
     228shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Canada/Atlantic' }).resolvedOptions().timeZone", "'America/Halifax'");
     229shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Canada/Central' }).resolvedOptions().timeZone", "'America/Winnipeg'");
     230shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Canada/East-Saskatchewan' }).resolvedOptions().timeZone", "'America/Regina'");
     231shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Canada/Eastern' }).resolvedOptions().timeZone", "'America/Toronto'");
     232shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Canada/Mountain' }).resolvedOptions().timeZone", "'America/Edmonton'");
     233shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Canada/Newfoundland' }).resolvedOptions().timeZone", "'America/St_Johns'");
     234shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Canada/Pacific' }).resolvedOptions().timeZone", "'America/Vancouver'");
     235shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Canada/Saskatchewan' }).resolvedOptions().timeZone", "'America/Regina'");
     236shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Canada/Yukon' }).resolvedOptions().timeZone", "'America/Whitehorse'");
     237shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Chile/Continental' }).resolvedOptions().timeZone", "'America/Santiago'");
     238shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Chile/EasterIsland' }).resolvedOptions().timeZone", "'Pacific/Easter'");
     239shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Cuba' }).resolvedOptions().timeZone", "'America/Havana'");
     240shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Egypt' }).resolvedOptions().timeZone", "'Africa/Cairo'");
     241shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Eire' }).resolvedOptions().timeZone", "'Europe/Dublin'");
     242shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Europe/Belfast' }).resolvedOptions().timeZone", "'Europe/London'");
     243shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Europe/Tiraspol' }).resolvedOptions().timeZone", "'Europe/Chisinau'");
     244shouldBe("Intl.DateTimeFormat('en', { timeZone: 'GB' }).resolvedOptions().timeZone", "'Europe/London'");
     245shouldBe("Intl.DateTimeFormat('en', { timeZone: 'GB-Eire' }).resolvedOptions().timeZone", "'Europe/London'");
     246shouldBe("Intl.DateTimeFormat('en', { timeZone: 'GMT+0' }).resolvedOptions().timeZone", "'UTC'");
     247shouldBe("Intl.DateTimeFormat('en', { timeZone: 'GMT-0' }).resolvedOptions().timeZone", "'UTC'");
     248shouldBe("Intl.DateTimeFormat('en', { timeZone: 'GMT0' }).resolvedOptions().timeZone", "'UTC'");
     249shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Greenwich' }).resolvedOptions().timeZone", "'UTC'");
     250shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Hongkong' }).resolvedOptions().timeZone", "'Asia/Hong_Kong'");
     251shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Iceland' }).resolvedOptions().timeZone", "'Atlantic/Reykjavik'");
     252shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Iran' }).resolvedOptions().timeZone", "'Asia/Tehran'");
     253shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Israel' }).resolvedOptions().timeZone", "'Asia/Jerusalem'");
     254shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Jamaica' }).resolvedOptions().timeZone", "'America/Jamaica'");
     255shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Japan' }).resolvedOptions().timeZone", "'Asia/Tokyo'");
     256shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Kwajalein' }).resolvedOptions().timeZone", "'Pacific/Kwajalein'");
     257shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Libya' }).resolvedOptions().timeZone", "'Africa/Tripoli'");
     258shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Mexico/BajaNorte' }).resolvedOptions().timeZone", "'America/Tijuana'");
     259shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Mexico/BajaSur' }).resolvedOptions().timeZone", "'America/Mazatlan'");
     260shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Mexico/General' }).resolvedOptions().timeZone", "'America/Mexico_City'");
     261shouldBe("Intl.DateTimeFormat('en', { timeZone: 'NZ' }).resolvedOptions().timeZone", "'Pacific/Auckland'");
     262shouldBe("Intl.DateTimeFormat('en', { timeZone: 'NZ-CHAT' }).resolvedOptions().timeZone", "'Pacific/Chatham'");
     263shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Navajo' }).resolvedOptions().timeZone", "'America/Denver'");
     264shouldBe("Intl.DateTimeFormat('en', { timeZone: 'PRC' }).resolvedOptions().timeZone", "'Asia/Shanghai'");
     265shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Poland' }).resolvedOptions().timeZone", "'Europe/Warsaw'");
     266shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Portugal' }).resolvedOptions().timeZone", "'Europe/Lisbon'");
     267shouldBe("Intl.DateTimeFormat('en', { timeZone: 'ROC' }).resolvedOptions().timeZone", "'Asia/Taipei'");
     268shouldBe("Intl.DateTimeFormat('en', { timeZone: 'ROK' }).resolvedOptions().timeZone", "'Asia/Seoul'");
     269shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Singapore' }).resolvedOptions().timeZone", "'Asia/Singapore'");
     270shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Turkey' }).resolvedOptions().timeZone", "'Europe/Istanbul'");
     271shouldBe("Intl.DateTimeFormat('en', { timeZone: 'UCT' }).resolvedOptions().timeZone", "'UTC'");
     272shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Alaska' }).resolvedOptions().timeZone", "'America/Anchorage'");
     273shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Aleutian' }).resolvedOptions().timeZone", "'America/Adak'");
     274shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Arizona' }).resolvedOptions().timeZone", "'America/Phoenix'");
     275shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Central' }).resolvedOptions().timeZone", "'America/Chicago'");
     276shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Eastern' }).resolvedOptions().timeZone", "'America/New_York'");
     277shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Hawaii' }).resolvedOptions().timeZone", "'Pacific/Honolulu'");
     278shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Michigan' }).resolvedOptions().timeZone", "'America/Detroit'");
     279shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Mountain' }).resolvedOptions().timeZone", "'America/Denver'");
     280shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Pacific' }).resolvedOptions().timeZone", "'America/Los_Angeles'");
     281shouldBe("Intl.DateTimeFormat('en', { timeZone: 'US/Samoa' }).resolvedOptions().timeZone", "'Pacific/Pago_Pago'");
     282shouldBe("Intl.DateTimeFormat('en', { timeZone: 'UTC' }).resolvedOptions().timeZone", "'UTC'");
     283shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Universal' }).resolvedOptions().timeZone", "'UTC'");
     284shouldBe("Intl.DateTimeFormat('en', { timeZone: 'W-SU' }).resolvedOptions().timeZone", "'Europe/Moscow'");
     285shouldBe("Intl.DateTimeFormat('en', { timeZone: 'Zulu' }).resolvedOptions().timeZone", "'UTC'");
     286
     287// Gets default calendar and numberingSystem from locale.
     288shouldBe("Intl.DateTimeFormat('ar-sa').resolvedOptions().locale", "'ar-SA'");
     289shouldBe("Intl.DateTimeFormat('ar-sa').resolvedOptions().calendar", "'islamic-umalqura'");
     290shouldBe("Intl.DateTimeFormat('ar-sa').resolvedOptions().numberingSystem", "'arab'");
     291
     292shouldBe("Intl.DateTimeFormat('en', { calendar:'dangi' }).resolvedOptions().calendar", "'gregorian'");
     293shouldBe("Intl.DateTimeFormat('en-u-ca-bogus').resolvedOptions().locale", "'en'");
     294shouldBe("Intl.DateTimeFormat('en-u-ca-bogus').resolvedOptions().calendar", "'gregorian'");
     295shouldBe("Intl.DateTimeFormat('en-u-ca-buddhist').resolvedOptions().locale", "'en-u-ca-buddhist'");
     296shouldBe("Intl.DateTimeFormat('en-u-ca-buddhist').resolvedOptions().calendar", "'buddhist'");
     297shouldBe("Intl.DateTimeFormat('en-u-ca-chinese').resolvedOptions().calendar", "'chinese'");
     298shouldBe("Intl.DateTimeFormat('en-u-ca-coptic').resolvedOptions().calendar", "'coptic'");
     299shouldBe("Intl.DateTimeFormat('en-u-ca-dangi').resolvedOptions().calendar", "'dangi'");
     300shouldBe("Intl.DateTimeFormat('en-u-ca-ethioaa').resolvedOptions().calendar", "'ethiopic-amete-alem'");
     301shouldBe("Intl.DateTimeFormat('en-u-ca-ethiopic').resolvedOptions().calendar", "'ethiopic'");
     302shouldBe("Intl.DateTimeFormat('ar-SA-u-ca-gregory').resolvedOptions().calendar", "'gregorian'");
     303shouldBe("Intl.DateTimeFormat('en-u-ca-hebrew').resolvedOptions().calendar", "'hebrew'");
     304shouldBe("Intl.DateTimeFormat('en-u-ca-indian').resolvedOptions().calendar", "'indian'");
     305shouldBe("Intl.DateTimeFormat('en-u-ca-islamic').resolvedOptions().calendar", "'islamic'");
     306shouldBe("Intl.DateTimeFormat('en-u-ca-islamicc').resolvedOptions().calendar", "'islamic-civil'");
     307shouldBe("Intl.DateTimeFormat('en-u-ca-ISO8601').resolvedOptions().calendar", "'iso8601'");
     308shouldBe("Intl.DateTimeFormat('en-u-ca-japanese').resolvedOptions().calendar", "'japanese'");
     309shouldBe("Intl.DateTimeFormat('en-u-ca-persian').resolvedOptions().calendar", "'persian'");
     310shouldBe("Intl.DateTimeFormat('en-u-ca-roc').resolvedOptions().calendar", "'roc'");
     311// FIXME: https://github.com/tc39/ecma402/issues/59
     312// shouldBe("Intl.DateTimeFormat('en-u-ca-ethiopic-amete-alem').resolvedOptions().calendar", "'ethioaa'");
     313// shouldBe("Intl.DateTimeFormat('en-u-ca-islamic-umalqura').resolvedOptions().calendar", "'islamic-umalqura'");
     314// shouldBe("Intl.DateTimeFormat('en-u-ca-islamic-tbla').resolvedOptions().calendar", "'islamic-tbla'");
     315// shouldBe("Intl.DateTimeFormat('en-u-ca-islamic-civil').resolvedOptions().calendar", "'islamic-civil'");
     316// shouldBe("Intl.DateTimeFormat('en-u-ca-islamic-rgsa').resolvedOptions().calendar", "'islamic-rgsa'");
     317
     318shouldBe("Intl.DateTimeFormat('en', { numberingSystem:'gujr' }).resolvedOptions().numberingSystem", "'latn'");
     319shouldBe("Intl.DateTimeFormat('en-u-nu-bogus').resolvedOptions().locale", "'en'");
     320shouldBe("Intl.DateTimeFormat('en-u-nu-bogus').resolvedOptions().numberingSystem", "'latn'");
     321shouldBe("Intl.DateTimeFormat('en-u-nu-latn').resolvedOptions().numberingSystem", "'latn'");
     322shouldBe("Intl.DateTimeFormat('en-u-nu-arab').resolvedOptions().locale", "'en-u-nu-arab'");
     323
     324let numberingSystems = [
     325  "arab", "arabext", "armn", "armnlow", "bali", "beng", "cham", "deva", "ethi",
     326  "fullwide", "geor", "grek", "greklow", "gujr", "guru", "hanidays", "hanidec",
     327  "hans", "hansfin", "hant", "hantfin", "hebr", "java", "jpan", "jpanfin",
     328  "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb",
     329  "mlym", "mong", "mtei", "mymr", "mymrshan", "nkoo", "olck", "orya", "roman",
     330  "romanlow", "saur", "sund", "talu", "taml", "tamldec", "telu", "thai", "tibt",
     331  "vaii"
     332]
     333for (let numberingSystem of numberingSystems) {
     334  shouldBe(`Intl.DateTimeFormat('en-u-nu-${numberingSystem}').resolvedOptions().numberingSystem`, `'${numberingSystem}'`);
     335}
     336
     337shouldThrow("Intl.DateTimeFormat('en', { weekday: { toString() { throw 'weekday' } } })", "'weekday'");
     338shouldThrow("Intl.DateTimeFormat('en', { weekday:'invalid' })", '\'RangeError: weekday must be "narrow", "short", or "long"\'');
     339shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().weekday", "undefined");
     340shouldBe("Intl.DateTimeFormat('en', { weekday:'narrow', month:'numeric', day:'numeric' }).resolvedOptions().weekday", "'narrow'");
     341shouldBe("Intl.DateTimeFormat('en', { weekday:'short', month:'numeric', day:'numeric' }).resolvedOptions().weekday", "'short'");
     342shouldBe("Intl.DateTimeFormat('en', { weekday:'long', month:'numeric', day:'numeric' }).resolvedOptions().weekday", "'long'");
     343
     344shouldThrow("Intl.DateTimeFormat('en', { era: { toString() { throw 'era' } } })", "'era'");
     345shouldThrow("Intl.DateTimeFormat('en', { era:'never' })", '\'RangeError: era must be "narrow", "short", or "long"\'');
     346shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().day", "undefined");
     347shouldBe("Intl.DateTimeFormat('en', { era:'narrow', year:'numeric' }).resolvedOptions().era", "'narrow'");
     348shouldBe("Intl.DateTimeFormat('en', { era:'short', year:'numeric' }).resolvedOptions().era", "'short'");
     349shouldBe("Intl.DateTimeFormat('en', { era:'long', year:'numeric' }).resolvedOptions().era", "'long'");
     350
     351shouldThrow("Intl.DateTimeFormat('en', { year: { toString() { throw 'year' } } })", "'year'");
     352shouldThrow("Intl.DateTimeFormat('en', { year:'nope' })", '\'RangeError: year must be "2-digit" or "numeric"\'');
     353shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().year", "undefined");
     354shouldBe("Intl.DateTimeFormat('en', { era:'narrow', year:'2-digit' }).resolvedOptions().year", "'2-digit'");
     355shouldBe("Intl.DateTimeFormat('en', { era:'narrow', year:'numeric' }).resolvedOptions().year", "'numeric'");
     356
     357shouldThrow("Intl.DateTimeFormat('en', { month: { toString() { throw 'month' } } })", "'month'");
     358shouldThrow("Intl.DateTimeFormat('en', { month:2 })", '\'RangeError: month must be "2-digit", "numeric", "narrow", "short", or "long"\'');
     359shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().month", "undefined");
     360shouldBe("Intl.DateTimeFormat('en', { month:'2-digit', year:'numeric' }).resolvedOptions().month", "'2-digit'");
     361shouldBe("Intl.DateTimeFormat('en', { month:'numeric', year:'numeric' }).resolvedOptions().month", "'numeric'");
     362shouldBe("Intl.DateTimeFormat('en', { month:'narrow', year:'numeric' }).resolvedOptions().month", "'narrow'");
     363shouldBe("Intl.DateTimeFormat('en', { month:'short', year:'numeric' }).resolvedOptions().month", "'short'");
     364shouldBe("Intl.DateTimeFormat('en', { month:'long', year:'numeric' }).resolvedOptions().month", "'long'");
     365
     366shouldThrow("Intl.DateTimeFormat('en', { day: { toString() { throw 'day' } } })", "'day'");
     367shouldThrow("Intl.DateTimeFormat('en', { day:'' })", '\'RangeError: day must be "2-digit" or "numeric"\'');
     368shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().day", "undefined");
     369shouldBe("Intl.DateTimeFormat('en', { month:'long', day:'2-digit' }).resolvedOptions().day", "'2-digit'");
     370shouldBe("Intl.DateTimeFormat('en', { month:'long', day:'numeric' }).resolvedOptions().day", "'numeric'");
     371
     372shouldThrow("Intl.DateTimeFormat('en', { hour: { toString() { throw 'hour' } } })", "'hour'");
     373shouldThrow("Intl.DateTimeFormat('en', { hour:[] })", '\'RangeError: hour must be "2-digit" or "numeric"\'');
     374shouldBe("Intl.DateTimeFormat('en').resolvedOptions().hour", "undefined");
     375shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'2-digit' }).resolvedOptions().hour", "'numeric'");
     376shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().hour", "'numeric'");
     377
     378shouldBe("Intl.DateTimeFormat('en').resolvedOptions().hour12", "undefined");
     379shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().hour12", "true");
     380shouldBe("Intl.DateTimeFormat('pt-BR', { minute:'2-digit', hour:'numeric' }).resolvedOptions().hour12", "false");
     381
     382shouldThrow("Intl.DateTimeFormat('en', { minute: { toString() { throw 'minute' } } })", "'minute'");
     383shouldThrow("Intl.DateTimeFormat('en', { minute:null })", '\'RangeError: minute must be "2-digit" or "numeric"\'');
     384shouldBe("Intl.DateTimeFormat('en').resolvedOptions().minute", "undefined");
     385shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric' }).resolvedOptions().minute", "'2-digit'");
     386shouldBe("Intl.DateTimeFormat('en', { minute:'numeric', hour:'numeric' }).resolvedOptions().minute", "'2-digit'");
     387
     388shouldThrow("Intl.DateTimeFormat('en', { second: { toString() { throw 'second' } } })", "'second'");
     389shouldThrow("Intl.DateTimeFormat('en', { second:'badvalue' })", '\'RangeError: second must be "2-digit" or "numeric"\'');
     390shouldBe("Intl.DateTimeFormat('en').resolvedOptions().second", "undefined");
     391shouldBe("Intl.DateTimeFormat('en', { minute:'numeric', hour:'numeric', second:'2-digit' }).resolvedOptions().second", "'2-digit'");
     392shouldBe("Intl.DateTimeFormat('en', { minute:'numeric', hour:'numeric', second:'numeric' }).resolvedOptions().second", "'2-digit'");
     393
     394shouldThrow("Intl.DateTimeFormat('en', { timeZoneName: { toString() { throw 'timeZoneName' } } })", "'timeZoneName'");
     395shouldThrow("Intl.DateTimeFormat('en', { timeZoneName:'name' })", '\'RangeError: timeZoneName must be "short" or "long"\'');
     396shouldBe("Intl.DateTimeFormat('en').resolvedOptions().timeZoneName", "undefined");
     397shouldBe("Intl.DateTimeFormat('en', { minute:'2-digit', hour:'numeric', timeZoneName:'short' }).resolvedOptions().timeZoneName", "'short'");
     398shouldBe("Intl.DateTimeFormat('pt-BR', { minute:'2-digit', hour:'numeric', timeZoneName:'long' }).resolvedOptions().timeZoneName", "'long'");
     399
     400let localesSample = [
     401  "ar", "ar-SA", "be", "ca", "cs", "da", "de", "de-CH", "en", "en-AU", "en-GB",
     402  "en-PH", "en-US", "el", "es", "es-MX", "es-PR", "fr", "fr-CA", "ga", "hi-IN",
     403  "is", "it", "iw", "ja", "ko-KR", "lt", "lv", "mk", "ms", "mt", "nb", "nl",
     404  "no", "pl", "pt", "pt-BR", "ro", "ru", "sk", "sl", "sr", "sv", "th", "tr",
     405  "uk", "vi", "zh", "zh-CN", "zh-Hant-HK", "zh-TW"
     406];
     407for (let locale of localesSample) {
     408  // The following subsets must be available for each locale:
     409  // weekday, year, month, day, hour, minute, second
     410  shouldBeTrue(`
     411    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", second: "numeric" };
     412    var resolved = Intl.DateTimeFormat("${locale}", options).resolvedOptions();
     413    Object.keys(options).every(option => resolved[option] != null)`);
     414  // weekday, year, month, day
     415  shouldBeTrue(`
     416    var options = { weekday: "short", year: "numeric", month: "short", day: "numeric" };
     417    var resolved = Intl.DateTimeFormat("${locale}", options).resolvedOptions();
     418    Object.keys(options).every(option => resolved[option] != null)`);
     419  // year, month, day
     420  shouldBeTrue(`
     421    var options = { year: "numeric", month: "long", day: "numeric" };
     422    var resolved = Intl.DateTimeFormat("${locale}", options).resolvedOptions();
     423    Object.keys(options).every(option => resolved[option] != null)`);
     424  // year, month
     425  shouldBeTrue(`
     426    var options = { year: "numeric", month: "long" };
     427    var resolved = Intl.DateTimeFormat("${locale}", options).resolvedOptions();
     428    Object.keys(options).every(option => resolved[option] != null)`);
     429  // month, day
     430  shouldBeTrue(`
     431    var options = { month: "long", day: "numeric" };
     432    var resolved = Intl.DateTimeFormat("${locale}", options).resolvedOptions();
     433    Object.keys(options).every(option => resolved[option] != null)`);
     434  // hour, minute, second
     435  shouldBeTrue(`
     436    var options = { hour: "numeric", minute: "numeric", second: "numeric" };
     437    var resolved = Intl.DateTimeFormat("${locale}", options).resolvedOptions();
     438    Object.keys(options).every(option => resolved[option] != null)`);
     439  // hour, minute
     440  shouldBeTrue(`
     441    var options = { hour: "numeric", minute: "numeric" };
     442    var resolved = Intl.DateTimeFormat("${locale}", options).resolvedOptions();
     443    Object.keys(options).every(option => resolved[option] != null)`);
     444}
  • trunk/Source/JavaScriptCore/ChangeLog

    r194385 r194387  
     12015-12-23  Andy VanWagoner  <andy@instructure.com>
     2
     3        [INTL] Implement Intl.DateTimeFormat.prototype.resolvedOptions ()
     4        https://bugs.webkit.org/show_bug.cgi?id=147603
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Implements InitializeDateTimeFormat and related abstract operations
     9        using ICU. Lazy initialization is used for DateTimeFormat.prototype.
     10        Refactor to align with Collator work.
     11
     12        * icu/unicode/udatpg.h: Added.
     13        * icu/unicode/unumsys.h: Added.
     14        * runtime/CommonIdentifiers.h:
     15        * runtime/IntlDateTimeFormat.cpp:
     16        (JSC::defaultTimeZone):
     17        (JSC::canonicalizeTimeZoneName):
     18        (JSC::localeData):
     19        (JSC::toDateTimeOptions):
     20        (JSC::IntlDateTimeFormat::setFormatsFromPattern):
     21        (JSC::IntlDateTimeFormat::initializeDateTimeFormat):
     22        (JSC::IntlDateTimeFormat::weekdayString):
     23        (JSC::IntlDateTimeFormat::eraString):
     24        (JSC::IntlDateTimeFormat::yearString):
     25        (JSC::IntlDateTimeFormat::monthString):
     26        (JSC::IntlDateTimeFormat::dayString):
     27        (JSC::IntlDateTimeFormat::hourString):
     28        (JSC::IntlDateTimeFormat::minuteString):
     29        (JSC::IntlDateTimeFormat::secondString):
     30        (JSC::IntlDateTimeFormat::timeZoneNameString):
     31        (JSC::IntlDateTimeFormat::resolvedOptions):
     32        (JSC::IntlDateTimeFormat::format):
     33        (JSC::IntlDateTimeFormatFuncFormatDateTime): Deleted.
     34        * runtime/IntlDateTimeFormat.h:
     35        * runtime/IntlDateTimeFormatConstructor.cpp:
     36        (JSC::constructIntlDateTimeFormat):
     37        (JSC::callIntlDateTimeFormat):
     38        * runtime/IntlDateTimeFormatPrototype.cpp:
     39        (JSC::IntlDateTimeFormatFuncFormatDateTime):
     40        (JSC::IntlDateTimeFormatPrototypeGetterFormat):
     41        (JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):
     42        * runtime/IntlObject.cpp:
     43        (JSC::resolveLocale):
     44        (JSC::getNumberingSystemsForLocale):
     45        * runtime/IntlObject.h:
     46
    1472015-12-22  Filip Pizlo  <fpizlo@apple.com>
    248
  • trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h

    r194248 r194387  
    8787    macro(bytecodes) \
    8888    macro(bytecodesID) \
     89    macro(calendar) \
    8990    macro(callee) \
    9091    macro(caller) \
     
    102103    macro(count) \
    103104    macro(counters) \
     105    macro(day) \
    104106    macro(defineProperty) \
    105107    macro(description) \
     
    110112    macro(entries) \
    111113    macro(enumerable) \
     114    macro(era) \
    112115    macro(eval) \
    113116    macro(exec) \
     
    117120    macro(focus) \
    118121    macro(forEach) \
     122    macro(formatMatcher) \
    119123    macro(forward) \
    120124    macro(from) \
     
    127131    macro(hash) \
    128132    macro(header) \
     133    macro(hour) \
     134    macro(hour12) \
    129135    macro(href) \
    130136    macro(id) \
     
    150156    macro(localeMatcher) \
    151157    macro(message) \
     158    macro(minute) \
     159    macro(month) \
    152160    macro(multiline) \
    153161    macro(name) \
    154162    macro(next) \
    155163    macro(now) \
     164    macro(numberingSystem) \
    156165    macro(numInlinedCalls) \
    157166    macro(numInlinedGetByIds) \
     
    173182    macro(replace) \
    174183    macro(resolve) \
     184    macro(second) \
    175185    macro(sensitivity) \
    176186    macro(set) \
     
    186196    macro(test) \
    187197    macro(then) \
     198    macro(timeZone) \
     199    macro(timeZoneName) \
    188200    macro(toExponential) \
    189201    macro(toFixed) \
     
    199211    macro(webkit) \
    200212    macro(webkitIndexedDB) \
     213    macro(weekday) \
    201214    macro(window) \
    202     macro(writable)
     215    macro(writable) \
     216    macro(year)
    203217
    204218#define JSC_COMMON_IDENTIFIERS_EACH_KEYWORD(macro) \
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp

    r192831 r194387  
    2929#if ENABLE(INTL)
    3030
    31 #include "DateConstructor.h"
    3231#include "DateInstance.h"
    3332#include "Error.h"
     
    3736#include "JSCJSValueInlines.h"
    3837#include "JSCellInlines.h"
     38#include "ObjectConstructor.h"
    3939#include "SlotVisitorInlines.h"
    4040#include "StructureInlines.h"
     41#include <unicode/ucal.h>
     42#include <unicode/udat.h>
     43#include <unicode/udatpg.h>
     44#include <unicode/uenum.h>
    4145
    4246namespace JSC {
    4347
    4448const ClassInfo IntlDateTimeFormat::s_info = { "Object", &Base::s_info, 0, CREATE_METHOD_TABLE(IntlDateTimeFormat) };
     49
     50static const char* const relevantExtensionKeys[2] = { "ca", "nu" };
     51static const size_t indexOfExtensionKeyCa = 0;
     52static const size_t indexOfExtensionKeyNu = 1;
     53
     54enum class DateTimeOptionRequired { Date, Time, Any };
     55enum class DateTimeOptionDefaults { Date, Time, All };
    4556
    4657IntlDateTimeFormat* IntlDateTimeFormat::create(VM& vm, IntlDateTimeFormatConstructor* constructor)
     
    8798}
    8899
    89 EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatFuncFormatDateTime(ExecState* state)
    90 {
    91     // 12.3.4 DateTime Format Functions (ECMA-402 2.0)
    92     // 1. Let dtf be the this value.
    93     IntlDateTimeFormat* format = jsDynamicCast<IntlDateTimeFormat*>(state->thisValue());
    94     // 2. Assert: Type(dtf) is Object and dtf has an [[initializedDateTimeFormat]] internal slot whose value is true.
    95     if (!format)
    96         return JSValue::encode(throwTypeError(state));
    97 
    98     JSValue date = state->argument(0);
    99     double value;
    100 
    101     // 3. If date is not provided or is undefined, then
    102     if (date.isUndefined()) {
    103         // a. Let x be %Date_now%().
    104         value = JSValue::decode(dateNow(state)).toNumber(state);
     100static String defaultTimeZone()
     101{
     102    // 6.4.3 DefaultTimeZone () (ECMA-402 2.0)
     103    // The DefaultTimeZone abstract operation returns a String value representing the valid (6.4.1) and canonicalized (6.4.2) time zone name for the host environment’s current time zone.
     104
     105    UErrorCode status = U_ZERO_ERROR;
     106    Vector<UChar, 32> buffer(32);
     107    auto bufferLength = ucal_getDefaultTimeZone(buffer.data(), buffer.capacity(), &status);
     108    if (status == U_BUFFER_OVERFLOW_ERROR) {
     109        status = U_ZERO_ERROR;
     110        buffer = Vector<UChar, 32>(bufferLength);
     111        ucal_getDefaultTimeZone(buffer.data(), bufferLength, &status);
     112    }
     113    if (U_SUCCESS(status)) {
     114        status = U_ZERO_ERROR;
     115        UBool isSystemID = false;
     116        Vector<UChar, 32> canonicalBuffer(32);
     117        auto canonicalLength = ucal_getCanonicalTimeZoneID(buffer.data(), bufferLength, canonicalBuffer.data(), canonicalBuffer.capacity(), &isSystemID, &status);
     118        if (status == U_BUFFER_OVERFLOW_ERROR) {
     119            status = U_ZERO_ERROR;
     120            canonicalBuffer = Vector<UChar, 32>(canonicalLength);
     121            ucal_getCanonicalTimeZoneID(buffer.data(), bufferLength, canonicalBuffer.data(), canonicalLength, &isSystemID, &status);
     122        }
     123        if (U_SUCCESS(status))
     124            return String(canonicalBuffer.data(), canonicalLength);
     125    }
     126
     127    return ASCIILiteral("UTC");
     128}
     129
     130static String canonicalizeTimeZoneName(const String& timeZoneName)
     131{
     132    // 6.4.1 IsValidTimeZoneName (timeZone)
     133    // The abstract operation returns true if timeZone, converted to upper case as described in 6.1, is equal to one of the Zone or Link names of the IANA Time Zone Database, converted to upper case as described in 6.1. It returns false otherwise.
     134    UErrorCode status = U_ZERO_ERROR;
     135    UEnumeration* timeZones = ucal_openTimeZones(&status);
     136    ASSERT(U_SUCCESS(status));
     137
     138    String canonical;
     139    do {
     140        status = U_ZERO_ERROR;
     141        int32_t ianaTimeZoneLength;
     142        // Time zone names are respresented as UChar[] in all related ICU apis.
     143        const UChar* ianaTimeZone = uenum_unext(timeZones, &ianaTimeZoneLength, &status);
     144        ASSERT(U_SUCCESS(status));
     145
     146        // End of enumeration.
     147        if (!ianaTimeZone)
     148            break;
     149
     150        StringView ianaTimeZoneView(ianaTimeZone, ianaTimeZoneLength);
     151        if (!equalIgnoringASCIICase(timeZoneName, ianaTimeZoneView))
     152            continue;
     153
     154        // Found a match, now canonicalize.
     155        // 6.4.2 CanonicalizeTimeZoneName (timeZone) (ECMA-402 2.0)
     156        // 1. Let ianaTimeZone be the Zone or Link name of the IANA Time Zone Database such that timeZone, converted to upper case as described in 6.1, is equal to ianaTimeZone, converted to upper case as described in 6.1.
     157        // 2. If ianaTimeZone is a Link name, then let ianaTimeZone be the corresponding Zone name as specified in the “backward” file of the IANA Time Zone Database.
     158
     159        Vector<UChar, 32> buffer(ianaTimeZoneLength);
     160        UBool isSystemID = false;
     161        status = U_ZERO_ERROR;
     162        auto canonicalLength = ucal_getCanonicalTimeZoneID(ianaTimeZone, ianaTimeZoneLength, buffer.data(), ianaTimeZoneLength, &isSystemID, &status);
     163        if (status == U_BUFFER_OVERFLOW_ERROR) {
     164            buffer = Vector<UChar, 32>(canonicalLength);
     165            isSystemID = false;
     166            status = U_ZERO_ERROR;
     167            ucal_getCanonicalTimeZoneID(ianaTimeZone, ianaTimeZoneLength, buffer.data(), canonicalLength, &isSystemID, &status);
     168        }
     169        ASSERT(U_SUCCESS(status));
     170        canonical = String(buffer.data(), canonicalLength);
     171    } while (canonical.isNull());
     172    uenum_close(timeZones);
     173
     174    // 3. If ianaTimeZone is "Etc/UTC" or "Etc/GMT", then return "UTC".
     175    if (canonical == "Etc/UTC" || canonical == "Etc/GMT")
     176        canonical = ASCIILiteral("UTC");
     177
     178    // 4. Return ianaTimeZone.
     179    return canonical;
     180}
     181
     182static Vector<String> localeData(const String& locale, size_t keyIndex)
     183{
     184    Vector<String> keyLocaleData;
     185    switch (keyIndex) {
     186    case indexOfExtensionKeyCa: {
     187        UErrorCode status = U_ZERO_ERROR;
     188        UEnumeration* calendars = ucal_getKeywordValuesForLocale("calendar", locale.utf8().data(), false, &status);
     189        ASSERT(U_SUCCESS(status));
     190
     191        status = U_ZERO_ERROR;
     192        int32_t nameLength;
     193        while (const char* availableName = uenum_next(calendars, &nameLength, &status)) {
     194            ASSERT(U_SUCCESS(status));
     195            status = U_ZERO_ERROR;
     196            String calendar = String(availableName, nameLength);
     197            keyLocaleData.append(calendar);
     198            // Ensure aliases used in language tag are allowed.
     199            if (calendar == "gregorian")
     200                keyLocaleData.append(ASCIILiteral("gregory"));
     201            else if (calendar == "islamic-civil")
     202                keyLocaleData.append(ASCIILiteral("islamicc"));
     203            else if (calendar == "ethiopic-amete-alem")
     204                keyLocaleData.append(ASCIILiteral("ethioaa"));
     205        }
     206        uenum_close(calendars);
     207        break;
     208    }
     209    case indexOfExtensionKeyNu:
     210        keyLocaleData = getNumberingSystemsForLocale(locale);
     211        break;
     212    default:
     213        ASSERT_NOT_REACHED();
     214    }
     215    return keyLocaleData;
     216}
     217
     218static JSObject* toDateTimeOptions(ExecState& exec, JSValue originalOptions, const DateTimeOptionRequired required, const DateTimeOptionDefaults defaults)
     219{
     220    // 12.1.1 ToDateTimeOptions abstract operation (ECMA-402 2.0)
     221    VM& vm = exec.vm();
     222
     223    // 1. If options is undefined, then let options be null, else let options be ToObject(options).
     224    // 2. ReturnIfAbrupt(options).
     225    // 3. Let options be ObjectCreate(options).
     226    JSObject* options;
     227    if (originalOptions.isUndefinedOrNull())
     228        options = constructEmptyObject(&exec, exec.lexicalGlobalObject()->nullPrototypeObjectStructure());
     229    else {
     230        JSObject* originalToObject = originalOptions.toObject(&exec);
     231        if (exec.hadException())
     232            return nullptr;
     233        options = constructEmptyObject(&exec, originalToObject);
     234    }
     235
     236    // 4. Let needDefaults be true.
     237    bool needDefaults = true;
     238
     239    // 5. If required is "date" or "any",
     240    if (required == DateTimeOptionRequired::Date || required == DateTimeOptionRequired::Any) {
     241        // a. For each of the property names "weekday", "year", "month", "day":
     242        // i. Let prop be the property name.
     243        // ii. Let value be Get(options, prop).
     244        // iii. ReturnIfAbrupt(value).
     245        // iv. If value is not undefined, then let needDefaults be false.
     246        JSValue weekday = options->get(&exec, vm.propertyNames->weekday);
     247        if (exec.hadException())
     248            return nullptr;
     249        if (!weekday.isUndefined())
     250            needDefaults = false;
     251
     252        JSValue year = options->get(&exec, vm.propertyNames->year);
     253        if (exec.hadException())
     254            return nullptr;
     255        if (!year.isUndefined())
     256            needDefaults = false;
     257
     258        JSValue month = options->get(&exec, vm.propertyNames->month);
     259        if (exec.hadException())
     260            return nullptr;
     261        if (!month.isUndefined())
     262            needDefaults = false;
     263
     264        JSValue day = options->get(&exec, vm.propertyNames->day);
     265        if (exec.hadException())
     266            return nullptr;
     267        if (!day.isUndefined())
     268            needDefaults = false;
     269    }
     270
     271    // 6. If required is "time" or "any",
     272    if (required == DateTimeOptionRequired::Time || required == DateTimeOptionRequired::Any) {
     273        // a. For each of the property names "hour", "minute", "second":
     274        // i. Let prop be the property name.
     275        // ii. Let value be Get(options, prop).
     276        // iii. ReturnIfAbrupt(value).
     277        // iv. If value is not undefined, then let needDefaults be false.
     278        JSValue hour = options->get(&exec, vm.propertyNames->hour);
     279        if (exec.hadException())
     280            return nullptr;
     281        if (!hour.isUndefined())
     282            needDefaults = false;
     283
     284        JSValue minute = options->get(&exec, vm.propertyNames->minute);
     285        if (exec.hadException())
     286            return nullptr;
     287        if (!minute.isUndefined())
     288            needDefaults = false;
     289
     290        JSValue second = options->get(&exec, vm.propertyNames->second);
     291        if (exec.hadException())
     292            return nullptr;
     293        if (!second.isUndefined())
     294            needDefaults = false;
     295    }
     296
     297    // 7. If needDefaults is true and defaults is either "date" or "all", then
     298    if (needDefaults && (defaults == DateTimeOptionDefaults::Date || defaults == DateTimeOptionDefaults::All)) {
     299        // a. For each of the property names "year", "month", "day":
     300        // i. Let status be CreateDatePropertyOrThrow(options, prop, "numeric").
     301        // ii. ReturnIfAbrupt(status).
     302        options->putDirect(vm, vm.propertyNames->year, jsString(&exec, "numeric"));
     303        if (exec.hadException())
     304            return nullptr;
     305
     306        options->putDirect(vm, vm.propertyNames->month, jsString(&exec, "numeric"));
     307        if (exec.hadException())
     308            return nullptr;
     309
     310        options->putDirect(vm, vm.propertyNames->day, jsString(&exec, "numeric"));
     311        if (exec.hadException())
     312            return nullptr;
     313    }
     314
     315    // 8. If needDefaults is true and defaults is either "time" or "all", then
     316    if (needDefaults && (defaults == DateTimeOptionDefaults::Time || defaults == DateTimeOptionDefaults::All)) {
     317        // a. For each of the property names "hour", "minute", "second":
     318        // i. Let status be CreateDatePropertyOrThrow(options, prop, "numeric").
     319        // ii. ReturnIfAbrupt(status).
     320        options->putDirect(vm, vm.propertyNames->hour, jsString(&exec, "numeric"));
     321        if (exec.hadException())
     322            return nullptr;
     323
     324        options->putDirect(vm, vm.propertyNames->minute, jsString(&exec, "numeric"));
     325        if (exec.hadException())
     326            return nullptr;
     327
     328        options->putDirect(vm, vm.propertyNames->second, jsString(&exec, "numeric"));
     329        if (exec.hadException())
     330            return nullptr;
     331    }
     332
     333    // 9. Return options.
     334    return options;
     335}
     336
     337void IntlDateTimeFormat::setFormatsFromPattern(const StringView& pattern)
     338{
     339    // Get all symbols from the pattern, and set format fields accordingly.
     340    // http://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
     341    unsigned length = pattern.length();
     342    for (unsigned i = 0; i < length; ++i) {
     343        UChar currentCharacter = pattern[i];
     344        if (!isASCIIAlpha(currentCharacter))
     345            continue;
     346
     347        unsigned count = 1;
     348        while (i + 1 < length && pattern[i + 1] == currentCharacter) {
     349            ++count;
     350            ++i;
     351        }
     352
     353        if (currentCharacter == 'h' || currentCharacter == 'K')
     354            m_hour12 = true;
     355        else if (currentCharacter == 'H' || currentCharacter == 'k')
     356            m_hour12 = false;
     357
     358        switch (currentCharacter) {
     359        case 'G':
     360            if (count <= 3)
     361                m_era = Era::Short;
     362            else if (count == 4)
     363                m_era = Era::Long;
     364            else if (count == 5)
     365                m_era = Era::Narrow;
     366            break;
     367        case 'y':
     368            if (count == 1)
     369                m_year = Year::Numeric;
     370            else if (count == 2)
     371                m_year = Year::TwoDigit;
     372            break;
     373        case 'M':
     374        case 'L':
     375            if (count == 1)
     376                m_month = Month::Numeric;
     377            else if (count == 2)
     378                m_month = Month::TwoDigit;
     379            else if (count == 3)
     380                m_month = Month::Short;
     381            else if (count == 4)
     382                m_month = Month::Long;
     383            else if (count == 5)
     384                m_month = Month::Narrow;
     385            break;
     386        case 'E':
     387        case 'e':
     388        case 'c':
     389            if (count <= 3)
     390                m_weekday = Weekday::Short;
     391            else if (count == 4)
     392                m_weekday = Weekday::Long;
     393            else if (count == 5)
     394                m_weekday = Weekday::Narrow;
     395            break;
     396        case 'd':
     397            if (count == 1)
     398                m_day = Day::Numeric;
     399            else if (count == 2)
     400                m_day = Day::TwoDigit;
     401            break;
     402        case 'h':
     403        case 'H':
     404        case 'k':
     405        case 'K':
     406            if (count == 1)
     407                m_hour = Hour::Numeric;
     408            else if (count == 2)
     409                m_hour = Hour::TwoDigit;
     410            break;
     411        case 'm':
     412            if (count == 1)
     413                m_minute = Minute::Numeric;
     414            else if (count == 2)
     415                m_minute = Minute::TwoDigit;
     416            break;
     417        case 's':
     418            if (count == 1)
     419                m_second = Second::Numeric;
     420            else if (count == 2)
     421                m_second = Second::TwoDigit;
     422            break;
     423        case 'z':
     424        case 'v':
     425        case 'V':
     426            if (count == 1)
     427                m_timeZoneName = TimeZoneName::Short;
     428            else if (count == 4)
     429                m_timeZoneName = TimeZoneName::Long;
     430            break;
     431        }
     432    }
     433}
     434
     435void IntlDateTimeFormat::initializeDateTimeFormat(ExecState& exec, JSValue locales, JSValue originalOptions)
     436{
     437    // 12.1.1 InitializeDateTimeFormat (dateTimeFormat, locales, options) (ECMA-402 2.0)
     438    // 1. If dateTimeFormat.[[initializedIntlObject]] is true, throw a TypeError exception.
     439    // 2. Set dateTimeFormat.[[initializedIntlObject]] to true.
     440
     441    // 3. Let requestedLocales be CanonicalizeLocaleList(locales).
     442    Vector<String> requestedLocales = canonicalizeLocaleList(exec, locales);
     443    // 4. ReturnIfAbrupt(requestedLocales),
     444    if (exec.hadException())
     445        return;
     446
     447    // 5. Let options be ToDateTimeOptions(options, "any", "date").
     448    JSObject* options = toDateTimeOptions(exec, originalOptions, DateTimeOptionRequired::Any, DateTimeOptionDefaults::Date);
     449    // 6. ReturnIfAbrupt(options).
     450    if (exec.hadException())
     451        return;
     452
     453    // 7. Let opt be a new Record.
     454    HashMap<String, String> localeOpt;
     455
     456    // 8. Let matcher be GetOption(options, "localeMatcher", "string", «"lookup", "best fit"», "best fit").
     457    VM& vm = exec.vm();
     458    String localeMatcher = intlStringOption(exec, options, vm.propertyNames->localeMatcher, { "lookup", "best fit" }, "localeMatcher must be either \"lookup\" or \"best fit\"", "best fit");
     459    // 9. ReturnIfAbrupt(matcher).
     460    if (exec.hadException())
     461        return;
     462    // 10. Set opt.[[localeMatcher]] to matcher.
     463    localeOpt.set(vm.propertyNames->localeMatcher.string(), localeMatcher);
     464
     465    // 11. Let localeData be the value of %DateTimeFormat%.[[localeData]].
     466    // 12. Let r be ResolveLocale( %DateTimeFormat%.[[availableLocales]], requestedLocales, opt, %DateTimeFormat%.[[relevantExtensionKeys]], localeData).
     467    const HashSet<String> availableLocales = exec.lexicalGlobalObject()->intlDateTimeFormatAvailableLocales();
     468    HashMap<String, String> resolved = resolveLocale(availableLocales, requestedLocales, localeOpt, relevantExtensionKeys, WTF_ARRAY_LENGTH(relevantExtensionKeys), localeData);
     469
     470    // 13. Set dateTimeFormat.[[locale]] to the value of r.[[locale]].
     471    m_locale = resolved.get(vm.propertyNames->locale.string());
     472    // 14. Set dateTimeFormat.[[calendar]] to the value of r.[[ca]].
     473    m_calendar = resolved.get(ASCIILiteral("ca"));
     474    // Switch to preferred aliases.
     475    if (m_calendar == "gregory")
     476        m_calendar = ASCIILiteral("gregorian");
     477    else if (m_calendar == "islamicc")
     478        m_calendar = ASCIILiteral("islamic-civil");
     479    else if (m_calendar == "ethioaa")
     480        m_calendar = ASCIILiteral("ethiopic-amete-alem");
     481    // 15. Set dateTimeFormat.[[numberingSystem]] to the value of r.[[nu]].
     482    m_numberingSystem = resolved.get(ASCIILiteral("nu"));
     483    // 16. Let dataLocale be the value of r.[[dataLocale]].
     484    String dataLocale = resolved.get(ASCIILiteral("dataLocale"));
     485
     486    // 17. Let tz be Get(options, "timeZone").
     487    JSValue tzValue = options->get(&exec, vm.propertyNames->timeZone);
     488    // 18. ReturnIfAbrupt(tz).
     489    if (exec.hadException())
     490        return;
     491
     492    // 19. If tz is not undefined, then
     493    String tz;
     494    if (!tzValue.isUndefined()) {
     495        // a. Let tz be ToString(tz).
     496        String originalTz = tzValue.toWTFString(&exec);
     497        // b. ReturnIfAbrupt(tz).
     498        if (exec.hadException())
     499            return;
     500        // c. If the result of IsValidTimeZoneName(tz) is false, then i. Throw a RangeError exception.
     501        // d. Let tz be CanonicalizeTimeZoneName(tz).
     502        tz = canonicalizeTimeZoneName(originalTz);
     503        if (tz.isNull()) {
     504            throwRangeError(&exec, String::format("invalid time zone: %s", originalTz.utf8().data()));
     505            return;
     506        }
    105507    } else {
    106         // 4. Else
    107         // a. Let x be ToNumber(date).
    108         value = date.toNumber(state);
    109         // b. ReturnIfAbrupt(x).
    110         if (state->hadException())
    111             return JSValue::encode(jsUndefined());
    112     }
    113 
    114     // 5. Return FormatDateTime(dtf, x).
    115 
     508        // 20. Else,
     509        // a. Let tz be DefaultTimeZone().
     510        tz = defaultTimeZone();
     511    }
     512
     513    // 21. Set dateTimeFormat.[[timeZone]] to tz.
     514    m_timeZone = tz;
     515
     516    // 22. Let opt be a new Record.
     517    // Rather than building a record, build the skeleton pattern.
     518    StringBuilder skeletonBuilder;
     519
     520    // 23. For each row of Table 3, except the header row, do:
     521    // a. Let prop be the name given in the Property column of the row.
     522    // b. Let value be GetOption(options, prop, "string", «the strings given in the Values column of the row», undefined).
     523    // c. ReturnIfAbrupt(value).
     524    // d. Set opt.[[<prop>]] to value.
     525    auto narrowShortLong = { "narrow", "short", "long" };
     526    auto twoDigitNumeric = { "2-digit", "numeric" };
     527    auto twoDigitNumericNarrowShortLong = { "2-digit", "numeric", "narrow", "short", "long" };
     528    auto shortLong = { "short", "long" };
     529
     530    String weekday = intlStringOption(exec, options, vm.propertyNames->weekday, narrowShortLong, "weekday must be \"narrow\", \"short\", or \"long\"", nullptr);
     531    if (exec.hadException())
     532        return;
     533    if (!weekday.isNull()) {
     534        if (weekday == "narrow")
     535            skeletonBuilder.appendLiteral("EEEEE");
     536        else if (weekday == "short")
     537            skeletonBuilder.appendLiteral("EEE");
     538        else if (weekday == "long")
     539            skeletonBuilder.appendLiteral("EEEE");
     540    }
     541
     542    String era = intlStringOption(exec, options, vm.propertyNames->era, narrowShortLong, "era must be \"narrow\", \"short\", or \"long\"", nullptr);
     543    if (exec.hadException())
     544        return;
     545    if (!era.isNull()) {
     546        if (era == "narrow")
     547            skeletonBuilder.appendLiteral("GGGGG");
     548        else if (era == "short")
     549            skeletonBuilder.appendLiteral("GGG");
     550        else if (era == "long")
     551            skeletonBuilder.appendLiteral("GGGG");
     552    }
     553
     554    String year = intlStringOption(exec, options, vm.propertyNames->year, twoDigitNumeric, "year must be \"2-digit\" or \"numeric\"", nullptr);
     555    if (exec.hadException())
     556        return;
     557    if (!year.isNull()) {
     558        if (year == "2-digit")
     559            skeletonBuilder.appendLiteral("yy");
     560        else if (year == "numeric")
     561            skeletonBuilder.append('y');
     562    }
     563
     564    String month = intlStringOption(exec, options, vm.propertyNames->month, twoDigitNumericNarrowShortLong, "month must be \"2-digit\", \"numeric\", \"narrow\", \"short\", or \"long\"", nullptr);
     565    if (exec.hadException())
     566        return;
     567    if (!month.isNull()) {
     568        if (month == "2-digit")
     569            skeletonBuilder.appendLiteral("MM");
     570        else if (month == "numeric")
     571            skeletonBuilder.append('M');
     572        else if (month == "narrow")
     573            skeletonBuilder.appendLiteral("MMMMM");
     574        else if (month == "short")
     575            skeletonBuilder.appendLiteral("MMM");
     576        else if (month == "long")
     577            skeletonBuilder.appendLiteral("MMMM");
     578    }
     579
     580    String day = intlStringOption(exec, options, vm.propertyNames->day, twoDigitNumeric, "day must be \"2-digit\" or \"numeric\"", nullptr);
     581    if (exec.hadException())
     582        return;
     583    if (!day.isNull()) {
     584        if (day == "2-digit")
     585            skeletonBuilder.appendLiteral("dd");
     586        else if (day == "numeric")
     587            skeletonBuilder.append('d');
     588    }
     589
     590    String hour = intlStringOption(exec, options, vm.propertyNames->hour, twoDigitNumeric, "hour must be \"2-digit\" or \"numeric\"", nullptr);
     591    if (exec.hadException())
     592        return;
     593
     594    // We need hour12 to make the hour skeleton pattern decision, so do this early.
     595    // 32. Let hr12 be GetOption(options, "hour12", "boolean", undefined, undefined).
     596    bool isHour12Undefined = true;
     597    bool hr12 = intlBooleanOption(exec, options, vm.propertyNames->hour12, isHour12Undefined);
     598    // 33. ReturnIfAbrupt(hr12).
     599    if (exec.hadException())
     600        return;
     601
     602    if (!hour.isNull()) {
     603        if (isHour12Undefined) {
     604            if (hour == "2-digit")
     605                skeletonBuilder.appendLiteral("jj");
     606            else if (hour == "numeric")
     607                skeletonBuilder.append('j');
     608        } else if (hr12) {
     609            if (hour == "2-digit")
     610                skeletonBuilder.appendLiteral("hh");
     611            else if (hour == "numeric")
     612                skeletonBuilder.append('h');
     613        } else {
     614            if (hour == "2-digit")
     615                skeletonBuilder.appendLiteral("HH");
     616            else if (hour == "numeric")
     617                skeletonBuilder.append('H');
     618        }
     619    }
     620
     621    String minute = intlStringOption(exec, options, vm.propertyNames->minute, twoDigitNumeric, "minute must be \"2-digit\" or \"numeric\"", nullptr);
     622    if (exec.hadException())
     623        return;
     624    if (!minute.isNull()) {
     625        if (minute == "2-digit")
     626            skeletonBuilder.appendLiteral("mm");
     627        else if (minute == "numeric")
     628            skeletonBuilder.append('m');
     629    }
     630
     631    String second = intlStringOption(exec, options, vm.propertyNames->second, twoDigitNumeric, "second must be \"2-digit\" or \"numeric\"", nullptr);
     632    if (exec.hadException())
     633        return;
     634    if (!second.isNull()) {
     635        if (second == "2-digit")
     636            skeletonBuilder.appendLiteral("ss");
     637        else if (second == "numeric")
     638            skeletonBuilder.append('s');
     639    }
     640
     641    String timeZoneName = intlStringOption(exec, options, vm.propertyNames->timeZoneName, shortLong, "timeZoneName must be \"short\" or \"long\"", nullptr);
     642    if (exec.hadException())
     643        return;
     644    if (!timeZoneName.isNull()) {
     645        if (timeZoneName == "short")
     646            skeletonBuilder.append('z');
     647        else if (timeZoneName == "long")
     648            skeletonBuilder.appendLiteral("zzzz");
     649    }
     650
     651    // 24. Let dataLocaleData be Get(localeData, dataLocale).
     652    // 25. Let formats be Get(dataLocaleData, "formats").
     653    // 26. Let matcher be GetOption(options, "formatMatcher", "string", «"basic", "best fit"», "best fit").
     654    intlStringOption(exec, options, vm.propertyNames->formatMatcher, { "basic", "best fit" }, "formatMatcher must be either \"basic\" or \"best fit\"", "best fit");
     655    // 27. ReturnIfAbrupt(matcher).
     656    if (exec.hadException())
     657        return;
     658
     659    // Always use ICU date format generator, rather than our own pattern list and matcher.
     660    // Covers steps 28-36.
     661    UErrorCode status = U_ZERO_ERROR;
     662    UDateTimePatternGenerator* generator = udatpg_open(dataLocale.utf8().data(), &status);
     663    if (U_FAILURE(status)) {
     664        throwTypeError(&exec, ASCIILiteral("failed to initialize DateTimeFormat"));
     665        return;
     666    }
     667
     668    String skeleton = skeletonBuilder.toString();
     669    StringView skeletonView(skeleton);
     670    Vector<UChar, 32> patternBuffer(32);
     671    status = U_ZERO_ERROR;
     672    auto patternLength = udatpg_getBestPattern(generator, skeletonView.upconvertedCharacters(), skeletonView.length(), patternBuffer.data(), patternBuffer.capacity(), &status);
     673    if (status == U_BUFFER_OVERFLOW_ERROR) {
     674        status = U_ZERO_ERROR;
     675        patternBuffer = Vector<UChar, 32>(patternLength);
     676        udatpg_getBestPattern(generator, skeletonView.upconvertedCharacters(), skeletonView.length(), patternBuffer.data(), patternLength, &status);
     677    }
     678    udatpg_close(generator);
     679    if (U_FAILURE(status)) {
     680        throwTypeError(&exec, ASCIILiteral("failed to initialize DateTimeFormat"));
     681        return;
     682    }
     683
     684    StringView pattern(patternBuffer.data(), patternLength);
     685    setFormatsFromPattern(pattern);
     686
     687    // 37. Set dateTimeFormat.[[boundFormat]] to undefined.
     688    // Already undefined.
     689
     690    // 38. Set dateTimeFormat.[[initializedDateTimeFormat]] to true.
     691    m_initializedDateTimeFormat = true;
     692
     693    // 39. Return dateTimeFormat.
     694    return;
     695}
     696
     697const char* IntlDateTimeFormat::weekdayString(Weekday weekday)
     698{
     699    switch (weekday) {
     700    case Weekday::Narrow:
     701        return ASCIILiteral("narrow");
     702    case Weekday::Short:
     703        return ASCIILiteral("short");
     704    case Weekday::Long:
     705        return ASCIILiteral("long");
     706    case Weekday::None:
     707        ASSERT_NOT_REACHED();
     708        return nullptr;
     709    }
     710    ASSERT_NOT_REACHED();
     711    return nullptr;
     712}
     713
     714const char* IntlDateTimeFormat::eraString(Era era)
     715{
     716    switch (era) {
     717    case Era::Narrow:
     718        return "narrow";
     719    case Era::Short:
     720        return "short";
     721    case Era::Long:
     722        return "long";
     723    case Era::None:
     724        ASSERT_NOT_REACHED();
     725        return nullptr;
     726    }
     727    ASSERT_NOT_REACHED();
     728    return nullptr;
     729}
     730
     731const char* IntlDateTimeFormat::yearString(Year year)
     732{
     733    switch (year) {
     734    case Year::TwoDigit:
     735        return "2-digit";
     736    case Year::Numeric:
     737        return "numeric";
     738    case Year::None:
     739        ASSERT_NOT_REACHED();
     740        return nullptr;
     741    }
     742    ASSERT_NOT_REACHED();
     743    return nullptr;
     744}
     745
     746const char* IntlDateTimeFormat::monthString(Month month)
     747{
     748    switch (month) {
     749    case Month::TwoDigit:
     750        return "2-digit";
     751    case Month::Numeric:
     752        return "numeric";
     753    case Month::Narrow:
     754        return "narrow";
     755    case Month::Short:
     756        return "short";
     757    case Month::Long:
     758        return "long";
     759    case Month::None:
     760        ASSERT_NOT_REACHED();
     761        return nullptr;
     762    }
     763    ASSERT_NOT_REACHED();
     764    return nullptr;
     765}
     766
     767const char* IntlDateTimeFormat::dayString(Day day)
     768{
     769    switch (day) {
     770    case Day::TwoDigit:
     771        return "2-digit";
     772    case Day::Numeric:
     773        return "numeric";
     774    case Day::None:
     775        ASSERT_NOT_REACHED();
     776        return nullptr;
     777    }
     778    ASSERT_NOT_REACHED();
     779    return nullptr;
     780}
     781
     782const char* IntlDateTimeFormat::hourString(Hour hour)
     783{
     784    switch (hour) {
     785    case Hour::TwoDigit:
     786        return "2-digit";
     787    case Hour::Numeric:
     788        return "numeric";
     789    case Hour::None:
     790        ASSERT_NOT_REACHED();
     791        return nullptr;
     792    }
     793    ASSERT_NOT_REACHED();
     794    return nullptr;
     795}
     796
     797const char* IntlDateTimeFormat::minuteString(Minute minute)
     798{
     799    switch (minute) {
     800    case Minute::TwoDigit:
     801        return "2-digit";
     802    case Minute::Numeric:
     803        return "numeric";
     804    case Minute::None:
     805        ASSERT_NOT_REACHED();
     806        return nullptr;
     807    }
     808    ASSERT_NOT_REACHED();
     809    return nullptr;
     810}
     811
     812const char* IntlDateTimeFormat::secondString(Second second)
     813{
     814    switch (second) {
     815    case Second::TwoDigit:
     816        return "2-digit";
     817    case Second::Numeric:
     818        return "numeric";
     819    case Second::None:
     820        ASSERT_NOT_REACHED();
     821        return nullptr;
     822    }
     823    ASSERT_NOT_REACHED();
     824    return nullptr;
     825}
     826
     827const char* IntlDateTimeFormat::timeZoneNameString(TimeZoneName timeZoneName)
     828{
     829    switch (timeZoneName) {
     830    case TimeZoneName::Short:
     831        return "short";
     832    case TimeZoneName::Long:
     833        return "long";
     834    case TimeZoneName::None:
     835        ASSERT_NOT_REACHED();
     836        return nullptr;
     837    }
     838    ASSERT_NOT_REACHED();
     839    return nullptr;
     840}
     841
     842JSObject* IntlDateTimeFormat::resolvedOptions(ExecState& exec)
     843{
     844    // 12.3.5 Intl.DateTimeFormat.prototype.resolvedOptions() (ECMA-402 2.0)
     845    // The function returns a new object whose properties and attributes are set as if constructed by an object literal assigning to each of the following properties the value of the corresponding internal slot of this DateTimeFormat object (see 12.4): locale, calendar, numberingSystem, timeZone, hour12, weekday, era, year, month, day, hour, minute, second, and timeZoneName. Properties whose corresponding internal slots are not present are not assigned.
     846    // Note: In this version of the ECMAScript 2015 Internationalization API, the timeZone property will be the name of the default time zone if no timeZone property was provided in the options object provided to the Intl.DateTimeFormat constructor. The previous version left the timeZone property undefined in this case.
     847    if (!m_initializedDateTimeFormat) {
     848        initializeDateTimeFormat(exec, jsUndefined(), jsUndefined());
     849        ASSERT(!exec.hadException());
     850    }
     851
     852    VM& vm = exec.vm();
     853    JSObject* options = constructEmptyObject(&exec);
     854    options->putDirect(vm, vm.propertyNames->locale, jsNontrivialString(&exec, m_locale));
     855    options->putDirect(vm, vm.propertyNames->calendar, jsNontrivialString(&exec, m_calendar));
     856    options->putDirect(vm, vm.propertyNames->numberingSystem, jsNontrivialString(&exec, m_numberingSystem));
     857    options->putDirect(vm, vm.propertyNames->timeZone, jsNontrivialString(&exec, m_timeZone));
     858
     859    if (m_weekday != Weekday::None)
     860        options->putDirect(vm, vm.propertyNames->weekday, jsNontrivialString(&exec, ASCIILiteral(weekdayString(m_weekday))));
     861
     862    if (m_era != Era::None)
     863        options->putDirect(vm, vm.propertyNames->era, jsNontrivialString(&exec, ASCIILiteral(eraString(m_era))));
     864
     865    if (m_year != Year::None)
     866        options->putDirect(vm, vm.propertyNames->year, jsNontrivialString(&exec, ASCIILiteral(yearString(m_year))));
     867
     868    if (m_month != Month::None)
     869        options->putDirect(vm, vm.propertyNames->month, jsNontrivialString(&exec, ASCIILiteral(monthString(m_month))));
     870
     871    if (m_day != Day::None)
     872        options->putDirect(vm, vm.propertyNames->day, jsNontrivialString(&exec, ASCIILiteral(dayString(m_day))));
     873
     874    if (m_hour != Hour::None) {
     875        options->putDirect(vm, vm.propertyNames->hour, jsNontrivialString(&exec, ASCIILiteral(hourString(m_hour))));
     876        options->putDirect(vm, vm.propertyNames->hour12, jsBoolean(m_hour12));
     877    }
     878
     879    if (m_minute != Minute::None)
     880        options->putDirect(vm, vm.propertyNames->minute, jsNontrivialString(&exec, ASCIILiteral(minuteString(m_minute))));
     881
     882    if (m_second != Second::None)
     883        options->putDirect(vm, vm.propertyNames->second, jsNontrivialString(&exec, ASCIILiteral(secondString(m_second))));
     884
     885    if (m_timeZoneName != TimeZoneName::None)
     886        options->putDirect(vm, vm.propertyNames->timeZoneName, jsNontrivialString(&exec, ASCIILiteral(timeZoneNameString(m_timeZoneName))));
     887
     888    return options;
     889}
     890
     891JSValue IntlDateTimeFormat::format(ExecState& exec, double value)
     892{
    116893    // 12.3.4 FormatDateTime abstract operation (ECMA-402 2.0)
     894    if (!m_initializedDateTimeFormat) {
     895        initializeDateTimeFormat(exec, jsUndefined(), jsUndefined());
     896        ASSERT(!exec.hadException());
     897    }
    117898
    118899    // 1. If x is not a finite Number, then throw a RangeError exception.
    119900    if (!std::isfinite(value))
    120         return JSValue::encode(throwRangeError(state, ASCIILiteral("date value is not finite in DateTimeFormat.format()")));
     901        return throwRangeError(&exec, ASCIILiteral("date value is not finite in DateTimeFormat format()"));
    121902
    122903    // FIXME: implement 2 - 9
    123904
    124905    // Return new Date(value).toString() until properly implemented.
    125     VM& vm = state->vm();
    126     JSGlobalObject* globalObject = state->callee()->globalObject();
     906    VM& vm = exec.vm();
     907    JSGlobalObject* globalObject = exec.callee()->globalObject();
    127908    DateInstance* d = DateInstance::create(vm, globalObject->dateStructure(), value);
    128     return JSValue::encode(JSValue(d).toString(state));
     909    return JSValue(d).toString(&exec);
    129910}
    130911
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormat.h

    r187575 r194387  
    4545    DECLARE_INFO;
    4646
     47    void initializeDateTimeFormat(ExecState&, JSValue locales, JSValue options);
     48    JSValue format(ExecState&, double value);
     49    JSObject* resolvedOptions(ExecState&);
     50
    4751    JSBoundFunction* boundFormat() const { return m_boundFormat.get(); }
    4852    void setBoundFormat(VM&, JSBoundFunction*);
     
    5458    static void visitChildren(JSCell*, SlotVisitor&);
    5559
     60private:
     61    enum class Weekday { None, Narrow, Short, Long };
     62    enum class Era { None, Narrow, Short, Long };
     63    enum class Year { None, TwoDigit, Numeric };
     64    enum class Month { None, TwoDigit, Numeric, Narrow, Short, Long };
     65    enum class Day { None, TwoDigit, Numeric };
     66    enum class Hour { None, TwoDigit, Numeric };
     67    enum class Minute { None, TwoDigit, Numeric };
     68    enum class Second { None, TwoDigit, Numeric };
     69    enum class TimeZoneName { None, Short, Long };
     70
     71    static const char* weekdayString(Weekday);
     72    static const char* eraString(Era);
     73    static const char* yearString(Year);
     74    static const char* monthString(Month);
     75    static const char* dayString(Day);
     76    static const char* hourString(Hour);
     77    static const char* minuteString(Minute);
     78    static const char* secondString(Second);
     79    static const char* timeZoneNameString(TimeZoneName);
     80
     81    bool m_initializedDateTimeFormat { false };
     82    void setFormatsFromPattern(const StringView&);
    5683    WriteBarrier<JSBoundFunction> m_boundFormat;
     84
     85    String m_locale { ASCIILiteral("en") };
     86    String m_calendar { ASCIILiteral("gregorian") };
     87    String m_numberingSystem { ASCIILiteral("latn") };
     88    String m_timeZone { ASCIILiteral("UTC") };
     89    bool m_hour12 { true };
     90    Weekday m_weekday { Weekday::None };
     91    Era m_era { Era::None };
     92    Year m_year { Year::None };
     93    Month m_month { Month::None };
     94    Day m_day { Day::None };
     95    Hour m_hour { Hour::None };
     96    Minute m_minute { Minute::None };
     97    Second m_second { Second::None };
     98    TimeZoneName m_timeZoneName { TimeZoneName::None };
    5799};
    58    
    59 EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatFuncFormatDateTime(ExecState*);
    60100
    61101} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp

    r192831 r194387  
    105105
    106106    // 4. Return InitializeDateTimeFormat(dateTimeFormat, locales, options).
    107     // FIXME: return JSValue::encode(InitializeDateTimeFormat(dateTimeFormat, locales, options));
    108 
     107    JSValue locales = state->argument(0);
     108    JSValue options = state->argument(1);
     109    dateTimeFormat->initializeDateTimeFormat(*state, locales, options);
    109110    return JSValue::encode(dateTimeFormat);
    110111}
     
    124125
    125126    // 4. Return InitializeDateTimeFormat(dateTimeFormat, locales, options).
    126     // FIXME: return JSValue::encode(InitializeDateTimeFormat(dateTimeFormat, locales, options));
    127 
     127    JSValue locales = state->argument(0);
     128    JSValue options = state->argument(1);
     129    dateTimeFormat->initializeDateTimeFormat(*state, locales, options);
    128130    return JSValue::encode(dateTimeFormat);
    129131}
     
    162164    return JSValue::encode(supportedLocales(*state, availableLocales, requestedLocales, state->argument(1)));
    163165}
    164    
     166
    165167void IntlDateTimeFormatConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
    166168{
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp

    r192831 r194387  
    2929#if ENABLE(INTL)
    3030
     31#include "DateConstructor.h"
    3132#include "Error.h"
    3233#include "IntlDateTimeFormat.h"
     34#include "IntlObject.h"
    3335#include "JSBoundFunction.h"
    3436#include "JSCJSValueInlines.h"
    3537#include "JSCellInlines.h"
    3638#include "JSObject.h"
    37 #include "ObjectConstructor.h"
    3839#include "StructureInlines.h"
    3940
    4041namespace JSC {
    41 
    42 STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(IntlDateTimeFormatPrototype);
    4342
    4443static EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatPrototypeGetterFormat(ExecState*);
     
    8786}
    8887
     88static EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatFuncFormatDateTime(ExecState* state)
     89{
     90    // 12.3.4 DateTime Format Functions (ECMA-402 2.0)
     91    // 1. Let dtf be the this value.
     92    // 2. Assert: Type(dtf) is Object and dtf has an [[initializedDateTimeFormat]] internal slot whose value is true.
     93    IntlDateTimeFormat* format = jsCast<IntlDateTimeFormat*>(state->thisValue());
     94
     95    JSValue date = state->argument(0);
     96    double value;
     97
     98    // 3. If date is not provided or is undefined, then
     99    if (date.isUndefined()) {
     100        // a. Let x be %Date_now%().
     101        value = JSValue::decode(dateNow(state)).toNumber(state);
     102    } else {
     103        // 4. Else
     104        // a. Let x be ToNumber(date).
     105        value = date.toNumber(state);
     106        // b. ReturnIfAbrupt(x).
     107        if (state->hadException())
     108            return JSValue::encode(jsUndefined());
     109    }
     110
     111    // 5. Return FormatDateTime(dtf, x).
     112    return JSValue::encode(format->format(*state, value));
     113}
     114
    89115EncodedJSValue JSC_HOST_CALL IntlDateTimeFormatPrototypeGetterFormat(ExecState* state)
    90116{
     
    95121    if (!dtf)
    96122        return JSValue::encode(throwTypeError(state, ASCIILiteral("Intl.DateTimeFormat.prototype.format called on value that's not an object initialized as a DateTimeFormat")));
    97    
     123
    98124    JSBoundFunction* boundFormat = dtf->boundFormat();
    99125    // 3. If the [[boundFormat]] internal slot of this DateTimeFormat object is undefined,
     
    107133        if (!boundArgs)
    108134            return JSValue::encode(throwOutOfMemoryError(state));
    109        
     135
    110136        // c. Let bf be BoundFunctionCreate(F, «this value»).
    111137        boundFormat = JSBoundFunction::create(vm, globalObject, targetObject, dtf, boundArgs, 1, ASCIILiteral("format"));
     
    120146{
    121147    // 12.3.5 Intl.DateTimeFormat.prototype.resolvedOptions() (ECMA-402 2.0)
    122     IntlDateTimeFormat* dtf = jsDynamicCast<IntlDateTimeFormat*>(state->thisValue());
    123     if (!dtf)
     148    IntlDateTimeFormat* dateTimeFormat = jsDynamicCast<IntlDateTimeFormat*>(state->thisValue());
     149    if (!dateTimeFormat)
    124150        return JSValue::encode(throwTypeError(state, ASCIILiteral("Intl.DateTimeFormat.prototype.resolvedOptions called on value that's not an object initialized as a DateTimeFormat")));
    125151
    126     // The function returns a new object whose properties and attributes are set as if constructed by an object literal assigning to each of the following properties the value of the corresponding internal slot of this DateTimeFormat object (see 12.4): locale, calendar, numberingSystem, timeZone, hour12, weekday, era, year, month, day, hour, minute, second, and timeZoneName. Properties whose corresponding internal slots are not present are not assigned.
    127     // Note: In this version of the ECMAScript 2015 Internationalization API, the timeZone property will be the name of the default time zone if no timeZone property was provided in the options object provided to the Intl.DateTimeFormat constructor. The previous version left the timeZone property undefined in this case.
    128 
    129     JSObject* options = constructEmptyObject(state);
    130 
    131     // FIXME: Populate object from internal slots.
    132 
    133     return JSValue::encode(options);
     152    return JSValue::encode(dateTimeFormat->resolvedOptions(*state));
    134153}
    135154
  • trunk/Source/JavaScriptCore/runtime/IntlObject.cpp

    r194253 r194387  
    4646#include "ObjectPrototype.h"
    4747#include <unicode/uloc.h>
     48#include <unicode/unumsys.h>
    4849#include <wtf/Assertions.h>
     50#include <wtf/NeverDestroyed.h>
    4951
    5052namespace JSC {
     
    752754            // ii. If keyPos != -1, then
    753755            if (keyPos != notFound) {
     756                // FIXME: https://github.com/tc39/ecma402/issues/59
    754757                // 1. If keyPos + 1 < extensionSubtagsLength and the length of the result of Get(extensionSubtags, ToString(keyPos +1)) is greater than 2, then
    755758                if (keyPos + 1 < extensionSubtags.size() && extensionSubtags[keyPos + 1].length() > 2) {
     
    922925}
    923926
     927Vector<String> getNumberingSystemsForLocale(const String& locale)
     928{
     929    static NeverDestroyed<Vector<String>> cachedNumberingSystems;
     930    Vector<String>& availableNumberingSystems = cachedNumberingSystems.get();
     931    if (availableNumberingSystems.isEmpty()) {
     932        UErrorCode status(U_ZERO_ERROR);
     933        UEnumeration* numberingSystemNames = unumsys_openAvailableNames(&status);
     934        ASSERT(U_SUCCESS(status));
     935        status = U_ZERO_ERROR;
     936
     937        int32_t resultLength;
     938        // Numbering system names are always ASCII, so use char[].
     939        while (const char* result = uenum_next(numberingSystemNames, &resultLength, &status)) {
     940            ASSERT(U_SUCCESS(status));
     941            status = U_ZERO_ERROR;
     942            availableNumberingSystems.append(String(result, resultLength));
     943        }
     944        uenum_close(numberingSystemNames);
     945    }
     946
     947    UErrorCode status(U_ZERO_ERROR);
     948    UNumberingSystem* defaultSystem = unumsys_open(locale.utf8().data(), &status);
     949    ASSERT(U_SUCCESS(status));
     950    String defaultSystemName(unumsys_getName(defaultSystem));
     951    unumsys_close(defaultSystem);
     952
     953    Vector<String> numberingSystems({ defaultSystemName });
     954    numberingSystems.appendVector(availableNumberingSystems);
     955    return numberingSystems;
     956}
     957
    924958} // namespace JSC
    925959
  • trunk/Source/JavaScriptCore/runtime/IntlObject.h

    r194253 r194387  
    6565HashMap<String, String> resolveLocale(const HashSet<String>& availableLocales, const Vector<String>& requestedLocales, const HashMap<String, String>& options, const char* const relevantExtensionKeys[], size_t relevantExtensionKeyCount, Vector<String> (*localeData)(const String&, size_t));
    6666JSValue supportedLocales(ExecState&, const HashSet<String>& availableLocales, const Vector<String>& requestedLocales, JSValue options);
    67 String removeUnicodeLocaleExtension(const String&);
    68 String bestAvailableLocale(const HashSet<String>&, const String&);
     67String removeUnicodeLocaleExtension(const String& locale);
     68String bestAvailableLocale(const HashSet<String>& availableLocales, const String& requestedLocale);
     69Vector<String> getNumberingSystemsForLocale(const String& locale);
    6970
    7071} // namespace JSC
  • trunk/Source/cmake/OptionsWin.cmake

    r194140 r194387  
    5656WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_TIME PUBLIC OFF)
    5757WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_WEEK PUBLIC OFF)
    58 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INTL PUBLIC ON)
    5958WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_CSS_VENDOR_PREFIXES PUBLIC ON)
    6059WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_NOTIFICATIONS PUBLIC OFF)
     
    164163    # Turn off certain link features
    165164    add_compile_options(/Gy- /openmp- /GF-)
    166    
     165
    167166    if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
    168167        set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:NOREF /OPT:NOICF")
    169168        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:NOREF /OPT:NOICF")
    170        
     169
    171170        # To debug linking time issues, uncomment the following three lines:
    172171        #add_compile_options(/Bv)
  • trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj

    r190848 r194387  
    3535/* Begin PBXBuildFile section */
    3636                0F5169CC1445222D00E0A9D7 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F5169CA1445222D00E0A9D7 /* WebKit.framework */; };
    37                 0F622CE91BBB3A1A00838AD3 /* TestOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F622CE81BBB3A1A00838AD3 /* TestOptions.cpp */; settings = {ASSET_TAGS = (); }; };
     37                0F622CE91BBB3A1A00838AD3 /* TestOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F622CE81BBB3A1A00838AD3 /* TestOptions.cpp */; };
    3838                0F73B5511BA78968004B3EF4 /* JSUIScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F73B54F1BA78968004B3EF4 /* JSUIScriptController.cpp */; };
    3939                0F73B5521BA78968004B3EF4 /* JSUIScriptController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F73B5501BA78968004B3EF4 /* JSUIScriptController.h */; };
    4040                0F73B55A1BA792FF004B3EF4 /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952C0C11F3B965003398B4 /* JSWrapper.cpp */; };
    4141                0F73B55C1BA89042004B3EF4 /* UIScriptControllerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F73B55B1BA89042004B3EF4 /* UIScriptControllerIOS.mm */; };
    42                 0F87B6131BACAD82004EC572 /* UIScriptControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B6111BACAD6F004EC572 /* UIScriptControllerMac.mm */; settings = {ASSET_TAGS = (); }; };
    43                 0F87B6171BACC4C0004EC572 /* TestRunnerWKWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B6151BACC4B9004EC572 /* TestRunnerWKWebView.mm */; settings = {ASSET_TAGS = (); }; };
    44                 0F87B6191BACC558004EC572 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F87B6181BACC558004EC572 /* Launch.storyboard */; settings = {ASSET_TAGS = (); }; };
    45                 0F87B61E1BACDA93004EC572 /* UIScriptContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B61A1BACDA93004EC572 /* UIScriptContext.cpp */; settings = {ASSET_TAGS = (); }; };
    46                 0F87B6201BACDA93004EC572 /* UIScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B61C1BACDA93004EC572 /* UIScriptController.cpp */; settings = {ASSET_TAGS = (); }; };
     42                0F87B6131BACAD82004EC572 /* UIScriptControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B6111BACAD6F004EC572 /* UIScriptControllerMac.mm */; };
     43                0F87B6171BACC4C0004EC572 /* TestRunnerWKWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B6151BACC4B9004EC572 /* TestRunnerWKWebView.mm */; };
     44                0F87B6191BACC558004EC572 /* Launch.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F87B6181BACC558004EC572 /* Launch.storyboard */; };
     45                0F87B61E1BACDA93004EC572 /* UIScriptContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B61A1BACDA93004EC572 /* UIScriptContext.cpp */; };
     46                0F87B6201BACDA93004EC572 /* UIScriptController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F87B61C1BACDA93004EC572 /* UIScriptController.cpp */; };
    4747                0FEB90A01905A834000FDBF3 /* InjectedBundlePageCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB909E1905A776000FDBF3 /* InjectedBundlePageCocoa.mm */; };
    4848                0FEB90A51905C016000FDBF3 /* CrashReporterInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB90A31905BC6A000FDBF3 /* CrashReporterInfo.mm */; };
    49                 0FEBF85A1BB61DF20028722D /* HIDEventGenerator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEBF8591BB61DF20028722D /* HIDEventGenerator.mm */; settings = {ASSET_TAGS = (); }; };
     49                0FEBF85A1BB61DF20028722D /* HIDEventGenerator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEBF8591BB61DF20028722D /* HIDEventGenerator.mm */; };
    5050                1CA211C91BCA107300B2101F /* FontWithFeatures.otf in Resources */ = {isa = PBXBuildFile; fileRef = 1CA211C71BCA107300B2101F /* FontWithFeatures.otf */; };
    5151                1CA211CA1BCA107300B2101F /* FontWithFeatures.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1CA211C81BCA107300B2101F /* FontWithFeatures.ttf */; };
     
    9494                8034C6621487636400AC32E9 /* AccessibilityControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8034C6611487636400AC32E9 /* AccessibilityControllerMac.mm */; };
    9595                8097338A14874A5A008156D9 /* AccessibilityNotificationHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8097338914874A5A008156D9 /* AccessibilityNotificationHandler.mm */; };
    96                 A185103A1B9AE0DA00744AEB /* CrashReporterInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB90A31905BC6A000FDBF3 /* CrashReporterInfo.mm */; settings = {ASSET_TAGS = (); }; };
    97                 A185103B1B9AE0E200744AEB /* TestControllerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DCE2CD11B84524500C7F832 /* TestControllerCocoa.mm */; settings = {ASSET_TAGS = (); }; };
    98                 A185103C1B9AE0FE00744AEB /* Options.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841CC00D181185BF0042E9B6 /* Options.cpp */; settings = {ASSET_TAGS = (); }; };
    99                 A185103D1B9AE10600744AEB /* TestInvocationCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC9192041333E4F8003011DC /* TestInvocationCG.cpp */; settings = {ASSET_TAGS = (); }; };
    100                 A185103E1B9AE12200744AEB /* CyclicRedundancyCheck.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5322FB4113FDA0CD0041ABCC /* CyclicRedundancyCheck.cpp */; settings = {ASSET_TAGS = (); }; };
    101                 A185103F1B9AE12900744AEB /* GeolocationProviderMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D758E5160BECDC00268472 /* GeolocationProviderMock.cpp */; settings = {ASSET_TAGS = (); }; };
    102                 A18510401B9AE13100744AEB /* PixelDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5322FB4413FDA0EA0041ABCC /* PixelDumpSupport.cpp */; settings = {ASSET_TAGS = (); }; };
    103                 A18510411B9AE13800744AEB /* TestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC793430118F7F19005EA8E2 /* TestController.cpp */; settings = {ASSET_TAGS = (); }; };
    104                 A18510421B9AE13E00744AEB /* TestInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD7D2F711921278006DB7EE /* TestInvocation.cpp */; settings = {ASSET_TAGS = (); }; };
    105                 A18510431B9AE14500744AEB /* WebNotificationProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3164C8EF15D1ADA100EF1FE0 /* WebNotificationProvider.cpp */; settings = {ASSET_TAGS = (); }; };
    106                 A18510441B9AE14A00744AEB /* WorkQueueManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4429FC5E1627089600F66D8B /* WorkQueueManager.cpp */; settings = {ASSET_TAGS = (); }; };
     96                A185103A1B9AE0DA00744AEB /* CrashReporterInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB90A31905BC6A000FDBF3 /* CrashReporterInfo.mm */; };
     97                A185103B1B9AE0E200744AEB /* TestControllerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DCE2CD11B84524500C7F832 /* TestControllerCocoa.mm */; };
     98                A185103C1B9AE0FE00744AEB /* Options.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 841CC00D181185BF0042E9B6 /* Options.cpp */; };
     99                A185103D1B9AE10600744AEB /* TestInvocationCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC9192041333E4F8003011DC /* TestInvocationCG.cpp */; };
     100                A185103E1B9AE12200744AEB /* CyclicRedundancyCheck.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5322FB4113FDA0CD0041ABCC /* CyclicRedundancyCheck.cpp */; };
     101                A185103F1B9AE12900744AEB /* GeolocationProviderMock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D758E5160BECDC00268472 /* GeolocationProviderMock.cpp */; };
     102                A18510401B9AE13100744AEB /* PixelDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5322FB4413FDA0EA0041ABCC /* PixelDumpSupport.cpp */; };
     103                A18510411B9AE13800744AEB /* TestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC793430118F7F19005EA8E2 /* TestController.cpp */; };
     104                A18510421B9AE13E00744AEB /* TestInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD7D2F711921278006DB7EE /* TestInvocation.cpp */; };
     105                A18510431B9AE14500744AEB /* WebNotificationProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3164C8EF15D1ADA100EF1FE0 /* WebNotificationProvider.cpp */; };
     106                A18510441B9AE14A00744AEB /* WorkQueueManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4429FC5E1627089600F66D8B /* WorkQueueManager.cpp */; };
    107107                A664BC7613A5F3A9009A7B25 /* libWebCoreTestSupport.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41230E16138C78BF00BCCFCA /* libWebCoreTestSupport.dylib */; };
    108108                BC14E4DB120E02D000826C0C /* GCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC14E4D9120E02D000826C0C /* GCController.cpp */; };
Note: See TracChangeset for help on using the changeset viewer.