Add ICU4X-based icu::Calendar implementations
Categories
(Core :: JavaScript: Internationalization API, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox139 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(9 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1954138 - Part 7: Test case to ensure Temporal and Intl.DateTimeFormat are consistent. r=dminor!
48 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1954138 - Part 8: Add a comment about a difference when compared to the spec polyfill. r=dminor!
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Some Temporal calendars are currently Nightly-only due to differences between ICU4C and ICU4X, see bug 1950425. Adding custom icu::Calendar
implementations which delegate to ICU4X will allow to re-enable these calendars again. (Except for islamic-umalqura
which requires changes in ICU4X, cf. https://github.com/unicode-org/icu4x/issues/4982.)
Assignee | ||
Comment 1•4 months ago
|
||
Patch ICU to allow modifying DateIntervalFormat's calendar.
Used in parts 2 and 4.
Assignee | ||
Comment 2•4 months ago
|
||
Always reset the Gregorian change date, because all uses either require the
Gregorian change date to be set to -8.64e15
or don't care about dates far
into the past.
The slow DateIntervalFormat::TryFormatCalendar
is now only used when
MOZ_SYSTEM_ICU
is defined.
And also resets the Gregorian change date for "buddhist", "japanese", and
"roc" to get consistent results when compared to the ICU4X-based Temporal
code.
Assignee | ||
Comment 3•4 months ago
|
||
Add ICU4X based calendars for Chinese, Dangun, Hijri observational, and
Persian to ensure consistent behaviour across Intl.DateTimeFormat
and
Temporal
.
This requires using the ICU4C C++ API, so it's not possible to use when
MOZ_SYSTEM_ICU
is defined. And ICU4X's calendar FFI needs to be available,
which is currently guarded by JS_HAS_TEMPORAL_API
.
Assignee | ||
Comment 4•4 months ago
|
||
Apply the calendar overrides from part 3.
Assignee | ||
Comment 5•4 months ago
|
||
ICU4X can return zero for day-of-month for Hijri calendars. Add a workaround
and more assertions to catch other possible invalid values from ICU4X.
Assignee | ||
Comment 6•4 months ago
|
||
Upstream bug report: https://unicode-org.atlassian.net/browse/ICU-23069
Assignee | ||
Comment 7•4 months ago
|
||
There are still differences for some calendars:
- Islamic Umm-Al-Qura, see https://github.com/unicode-org/icu4x/issues/6197.
- Negative years in the Hebrew calendar, see https://unicode-org.atlassian.net/browse/ICU-23007.
Negative years in the Hebrew calendar shouldn't be too important, if necessary we
could also provide our own icu::Calendar
implementation to use ICU4X. And for
Umm-Al-Qura we should wait for ICU4X to align with KACST.
Assignee | ||
Comment 8•4 months ago
|
||
Assignee | ||
Comment 9•4 months ago
|
||
Re-enable all calendars except IslamicUmmAlQura, which should be first changed
in ICU4X to agree with KACST.
Upstream issue: https://github.com/unicode-org/icu4x/issues/6197
Updated•4 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Comment 10•3 months ago
|
||
Comment 11•3 months ago
|
||
Backed out for causing process crash @RaiseException
Assignee | ||
Updated•3 months ago
|
Comment 12•3 months ago
|
||
Comment 13•3 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9ebef6fdde0b
https://hg.mozilla.org/mozilla-central/rev/d9e574de3c9d
https://hg.mozilla.org/mozilla-central/rev/c7e09e2ace9d
https://hg.mozilla.org/mozilla-central/rev/8859922bd545
https://hg.mozilla.org/mozilla-central/rev/c826e881a621
https://hg.mozilla.org/mozilla-central/rev/e945a234d4f7
https://hg.mozilla.org/mozilla-central/rev/ccd126599ad3
https://hg.mozilla.org/mozilla-central/rev/98e3f72d0afc
https://hg.mozilla.org/mozilla-central/rev/0d38ed4696e1
Updated•2 months ago
|
Description
•