Skip to content

ICU-23364 Add support of the new dayOfMonths CLDR resources (and the "ddd" pattern symbol) to ICU#4010

Open
richgillam wants to merge 15 commits into
unicode-org:mainfrom
richgillam:ICU-23364-days-of-month
Open

ICU-23364 Add support of the new dayOfMonths CLDR resources (and the "ddd" pattern symbol) to ICU#4010
richgillam wants to merge 15 commits into
unicode-org:mainfrom
richgillam:ICU-23364-days-of-month

Conversation

@richgillam

@richgillam richgillam commented May 28, 2026

Copy link
Copy Markdown
Contributor

This PR adds support in ICU for the new daysOfMonths resources introduced to CLDR by https://unicode-org.atlassian.net/browse/CLDR-7408. It includes:

  • Temporary local ICU-data additions for the new resources added in CLDR (they're temporary until we get the "real" ones copied over in a future CLDR integration).
  • An update to the CLDR-to-ICU tool to bring the new CLDR resources over into ICU.
  • New API on DateFormatSymbols for the new resources (API proposal forthcoming).
  • Code to properly handle the new ddd pattern/skeleton sequence in SimpleDateFormat (both formatting and parsing) and DateTimePatternGenerator.
  • Unit tests for all of the above.

This PR is large; I split it into 10 separate commits to make it easier to review.

A few issues worth calling out:

  • As I mentioned above, I manually brought over the changes to the ICU data that correspond to the new changes in CLDR. The changes were generated by the CLDR-to-ICU tool with my change in place. I'm expecting these changes to be stomped over by the next official CLDR integration (which hopefully won't actually change the dayOfMonths stuff), but this lets us test the implementation in advance of the next CLDR integration landing.
  • The temporary ICU-data changes on the Java side required regenerating ALL of the Java .res files, and I think I may have accidentally picked up some stray changes we don't want. I think we lost a few files we want to keep, and there are a couple stray unit-test changes unrelated to the work of this PR that I think happened because we picked up extraneous changes in the Java ICU data. I'm assuming (hoping?) this will all get straightened out in the next CLDR integration.
  • There is no testing included for the <dayOfMonth type="x"> resources right now because nothing in the CLDR change uses them. I have tested these resources in Apple ICU on changes that aren't in CLDR-7408. I made two CLDR changes in Apple CLDR that we don't have in open-source CLDR: 1) Support for ordinals (i.e., just "1er") in French, and 2) replacement of the "hanidays" numbering system with equivalent dayOfMonths resources. I can file tickets to add these things to CLDR and add appropriate unit tests for them to ICU. (As I said, I have all that in Apple ICU, so the relevant code here has been tested.)

Checklist

  • Required: Issue filed: ICU-23364
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable
  • Approver: Feel free to merge on my behalf

@richgillam

richgillam commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

NOTE TO SELF: In addition to the current failing tests in Java (which seem to be because I screwed up the Java data generation process and accidentally deleted some key files), I'm also getting reports that the Java code fails on skeletons that include dd (such as yMMMMdd and yMMMdd). The C++ code apparently works. Claude claimed I didn't need to make any DateTimePatternGenerator changes on the Java side, but this is apparently wrong and needs a closer look, plus we need to add the dd tests in both C++ and Java.

…ommmit. Fixed a bug in the way

DateTimePatternGenerator handled "dd" skeletons in Java and added appropriate unit tests for the "dd" problem.

This reverts commit 54b90d7.
@richgillam

Copy link
Copy Markdown
Contributor Author

NOTE TO SELF: In addition to the current failing tests in Java (which seem to be because I screwed up the Java data generation process and accidentally deleted some key files), I'm also getting reports that the Java code fails on skeletons that include dd (such as yMMMMdd and yMMMdd). The C++ code apparently works. Claude claimed I didn't need to make any DateTimePatternGenerator changes on the Java side, but this is apparently wrong and needs a closer look, plus we need to add the dd tests in both C++ and Java.

I think I've fixed this now...

@macchiati macchiati left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Java looks good; my C++ skills are too rusty for that part.

@markusicu markusicu self-assigned this Jun 4, 2026
…c API (and for those that weren't needed by

SimpleDateFormat, removed them altogether).  Removed the unit tests for the new methods on DateFormatSymbols.
Renamed getDayOfMonthTypeNames() to getDayOfMonthCardinalNames() in an effort to improve clarity.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants