Bug 209783 - [ECMA-402] Fix Intl.DateTimeFormat patterns and fields in WebKit
Summary: [ECMA-402] Fix Intl.DateTimeFormat patterns and fields in WebKit
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ross Kirsling
Keywords: InRadar
Depends on:
Reported: 2020-03-30 15:16 PDT by Shane Carr
Modified: 2020-04-15 12:51 PDT (History)
14 users (show)

See Also:

Patch (17.48 KB, patch)
2020-04-12 21:01 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch (17.47 KB, patch)
2020-04-12 21:26 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shane Carr 2020-03-30 15:16:20 PDT
Two normative PRs in ECMA-402 changed some behavior relating to non-Gregorian calendars in Intl.DateTimeFormat:

- https://github.com/tc39/ecma402/pull/349
- https://github.com/tc39/ecma402/pull/351

V8 and SM now implement the new behavior described in those PRs.  WebKit users will get lower-quality i18n behavior relative to other browsers until these PRs are also fixed in WebKit.
Comment 1 Radar WebKit Bug Importer 2020-03-30 16:39:36 PDT
Comment 2 Ross Kirsling 2020-04-12 21:01:44 PDT
Created attachment 396254 [details]
Comment 3 Ross Kirsling 2020-04-12 21:10:33 PDT
Comment on attachment 396254 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=396254&action=review

> JSTests/test262/config.yaml:159
> +    # These tests require macOS system ICU to actually update its CLDR data >:(
> +    # https://bugs.webkit.org/show_bug.cgi?id=209783
> +    - test/intl402/DateTimeFormat/prototype/format/related-year-zh.js
> +    - test/intl402/DateTimeFormat/prototype/formatToParts/related-year-zh.js

This is super frustrating, but evidently the CLDR data in current Catalina is much older than what should be included with ICU 64 (namely, CLDR 35).

You can see its zh locale data here:

It lacks this change which should go back to at least ICU 60 (meaning all WK platforms are meant to have it):
Comment 4 Ross Kirsling 2020-04-12 21:26:46 PDT
Created attachment 396255 [details]
Comment 5 Keith Miller 2020-04-15 12:39:40 PDT
Comment on attachment 396255 [details]

Comment 6 EWS 2020-04-15 12:51:29 PDT
Committed r260145: <https://trac.webkit.org/changeset/260145>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396255 [details].