Ignore:
Timestamp:
Aug 26, 2020, 9:48:33 AM (5 years ago)
Author:
[email protected]
Message:

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

Reviewed by Ross Kirsling.

JSTests:

Test262 is showing wrong ordering of option property accesses compared to the latest PR.
Later, we should update Test262.

  • stress/intl-datetimeformat.js:

(const.options.get second):
(const.options.get fractionalSecondDigits):
(const.options.get localeMatcher):
(const.options.get timeZoneName):
(const.options.get formatMatcher):

  • test262/config.yaml:
  • test262/expectations.yaml:

Source/JavaScriptCore:

This patch implements fractionalSecondDigits option for Intl.DateTimeFormat. If it is
specified, milliseconds in N digits are represented in the formatted output.
This extension is about to be merged into the spec[1]. SpiderMonkey and V8 support it,
and V8 shipped it without flags.

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

  • builtins/DatePrototype.js:

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

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

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

  • runtime/IntlDateTimeFormat.h:
File:
1 edited

Legend:

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