Skip to content

CLDR-19662 Fix ordinal dates - #6014

Open
macchiati wants to merge 6 commits into
mainfrom
CLDR-19662-Fix-ordinal-dates
Open

CLDR-19662 Fix ordinal dates#6014
macchiati wants to merge 6 commits into
mainfrom
CLDR-19662-Fix-ordinal-dates

Conversation

@macchiati

@macchiati macchiati commented Aug 5, 2026

Copy link
Copy Markdown
Member

CLDR-19662

  • Adds tooling to figure out what to do

    • FixOrdinalDates.java, SplitPath.java
  • Removes paths with /dayOfMonth and ddd from locales (but not en|en_AU|en_CA|en_GB|en_IN|fr|fr_CA|hy|ka|mk|or|tk|uk)

    • but leaves calendar aliases in root.
    • made manual spot fixes to one path in each of de, ky, sk, zh_Hant, to fix cases with ddd in pattern but not in skeleton
  • Adds modifications to coverageLevels.xml for coverage, and a small bit of syntax to allow for much simpler rules.

  • Also checks in modify_config.txt, for a paper trail.

  • tools/cldr-code/src/main/java/org/unicode/cldr/tool/CLDRConfigFileFilter.java

    • Ran into a problem where CLDRModify wasn't working right. The problem was a trailing ';'. So made fixes to address that for the future (since it could surprise others as well).
  • Modifications in other code files were all about getting coverage to work better.

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

@macchiati

Copy link
Copy Markdown
Member Author

I think the work is mostly done, but will have to get the tests to pass.

@macchiati
macchiati marked this pull request as ready for review August 6, 2026 03:52
@AEApple

AEApple commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

JFY: Waiting to review this until it passes all tests

@macchiati

Copy link
Copy Markdown
Member Author

This is disturbing; all the tests pass locally for me. Will have to track down.

@macchiati

Copy link
Copy Markdown
Member Author

Hmmm. I can't reproduce the test failures locally; I'll have some time later this afternoon. However, I think what I'll do for dates is add the pattern that the spec algorithm would produce (if any), and if that succeeds, count it as covered.

@srl295

srl295 commented Aug 6, 2026

Copy link
Copy Markdown
Member

This is disturbing; all the tests pass locally for me. Will have to track down.

Your branch is 8 commits behind main. e38dbeb That could be related. The pull_request build builds against the latest main, with your PR on top.

@srl295

srl295 commented Aug 6, 2026

Copy link
Copy Markdown
Member

@macchiati fails for me locally also, even without an update. were you running -e10?

    TestAllLocales {
      Error: (TestCheckCLDR.java:506) : en_CA //ldml/dates/calendars/calendar[@type="generic"]/dateTimeFormats/availableFormats/dateFormatItem[@id="MMMMddd"]: expected != null
      Error: (TestCheckCLDR.java:506) : en_CA //ldml/dates/calendars/calendar[@type="generic"]/dateTimeFormats/availableFormats/dateFormatItem[@id="MMMEddd"]: expected != null
      Error: (TestCheckCLDR.java:506) : or //ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="GyMMMddd"]: expected != null
      Error: (TestCheckCLDR.java:506) : or //ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="MMMMddd"]: expected != null
      Error: (TestCheckCLDR.java:506) : or //ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="MMMddd"]: expected != null
      Error: (TestCheckCLDR.java:506) : or //ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="MMMEddd"]: expected != null
      Error: (TestCheckCLDR.java:506) : or //ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="MMMMEddd"]: expected != null
      Error: (TestCheckCLDR.java:506) : or //ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="GyMMMEddd"]: expected != null
      Error: (TestCheckCLDR.java:506) : or //ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="GyMMMMddd"]: expected != null
      Error: (TestCheckCLDR.java:506) : or //ldml/dates/calendars/calendar[@type="gregorian"]/dateTimeFormats/availableFormats/dateFormatItem[@id="GyMMMMEddd"]: expected != null

@macchiati

Copy link
Copy Markdown
Member Author

Ah, that must be the problem!

Realized that

1. en was missing a couple of items
2. or and hy really weren't using any ddd in patterns, so removed.
Comment thread common/main/hy.xml
<dateFormatItem id="GyMEd">G dd.MM.y, E</dateFormatItem>
<dateFormatItem id="GyMMM">G y թ. MMM</dateFormatItem>
<dateFormatItem id="GyMMMd">G y թ․ MMM d</dateFormatItem>
<dateFormatItem id="GyMMMddd">G y թ․ MMM d</dateFormatItem>

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.

Should this be an error? Or is it just an OK fallback?

Are you removing a “vote for constructed” essentially?

just trying to understand

Comment thread common/main/or.xml
</dateTimeFormats>
</calendar>
<calendar type="generic">
<dayOfMonths>

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.

Was this also an error for them to enter? Or fallback behavior?

@srl295 srl295 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.

Looks good but have questions.

@macchiati

Copy link
Copy Markdown
Member Author

Sigh, now showing errors like the following, even though de, root, etc don't have ddd's

Error: (TestCheckCLDR.java:506) Error: : de_CH //ldml/dates/calendars/calendar[@type="generic"]/dateTimeFormats/availableFormats/dateFormatItem[@id="MMMMddd"]: expected != null

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