fix: Add support for the new Japanese Era (Reiwa) to ICU #17833
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
This change backports changes from the upstream ICU project's maintenance release for ICU 62.2 in order to enable support for the new Japanese Era "Reiwa" in Chromium 69 (which uses ICU version 62.1).
Upstream release: http://site.icu-project.org/download/62
Background information:
This PR removes the patch for the "placeholder" era name support that was added in PR #17518, and replaces it with a new patch that adds support for the official new era name, and bumps the ICU version from 62.1 to 62.2.
With this change you now get correct results for various JavaScript date/time formatting APIs for the Japanese calendar.
Additionally, this PR also backports some additional bug fixes from upstream as well.
This PR also includes the following fixes/updates:
This change requires re-generating the checked-in Chromium ICU data files (ex: icudtl.dat) in order for them to have the updated data for the new era name.
Note: All of the checked-in files are be regenerated, even though the Electron project only uses the "common" one.
Screenshots:
Before, with the placeholder era not enabled. (Incorrectly showing dates after May 1 2019 using the Heisei era).
After, correctly using the new era Reiwa for dates after April 30, 2019.
You can also see the version bump for
icu
andtz
in the screenshot.Sample code (for testing):
Checklist
npm test
passesRelease Notes
Notes: