Ignore:
Timestamp:
Aug 29, 2020, 1:32:45 AM (5 years ago)
Author:
[email protected]
Message:

[JSC] Implement Intl.DateTimeFormat dayPeriod
https://bugs.webkit.org/show_bug.cgi?id=215839

Reviewed by Ross Kirsling.

JSTests:

  • stress/intl-datetimeformat-day-period.js: Added.

(shouldBe):
(throw.new.Error):

  • test262/config.yaml:

Source/JavaScriptCore:

This patch implements Intl.DateTimeFormat dayPeriod option[1]. We can use "narrow", "short", or "long" for dayPeriod,
and it determines how "AM" etc. is represented.

[1]: https://github.com/tc39/ecma402/pull/346

  • builtins/DatePrototype.js:

(toLocaleString.toDateTimeOptionsAnyAll):
(toLocaleString):
(toLocaleTimeString.toDateTimeOptionsTimeTime):
(toLocaleTimeString):

  • bytecode/BytecodeIntrinsicRegistry.cpp:

(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • runtime/CommonIdentifiers.h:
  • runtime/IntlDateTimeFormat.cpp:

(JSC::toDateTimeOptionsAnyDate):
(JSC::IntlDateTimeFormat::setFormatsFromPattern):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::dayPeriodString):
(JSC::IntlDateTimeFormat::resolvedOptions const):

  • runtime/IntlDateTimeFormat.h:
  • runtime/OptionsList.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.