Skip to content

Conversation

@macchiati
Copy link
Member

@macchiati macchiati commented Dec 9, 2025

CLDR-19106

  • Add test for {0}{1} datetimeformats that could have digits at the end of {0} merging with digits at the start of {1}. Eg, ...ddHH... resulting in a datetime format like Sept3023AM

  • Fix other formats that could cause problems.

    • This adds yue, yue_Hans to the locales
    • Also does the full, long, medium as well as short (because of available formats)
  • Note: This is a quick fix for a bad situation. We may be able to allow {0}{1} for some combinations of formats, in the future, but it is much worse to have missing spaces when needed, than extra spaces that are not needed.

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

throw new IllegalArgumentException("Enhance checks to handle {0}{1}");
}

// TODO: also check the available formats that are for a date
Copy link
Member

Choose a reason for hiding this comment

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

This is an important TODO. We use these glue patterns to assemble date+time patterns from availableFormats.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. At first I wasn't checking for this, and just the short datetime pattern needed to be fixed. But then I realized that it needed to be extended.

if (path.startsWith(collisionPrefix)) {
if (parts.containsElement("dateTimeFormats")
&& !parts.containsElement("appendItems")) {
checkDateTimeFormats(path, parts, value, result);
Copy link
Member

Choose a reason for hiding this comment

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

Question: this means we're checking all of the datetime glue patterns (short/medium/long/full and standard/atTime), correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

right.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm,, I had approved this when it was still draft, but somehow that got erased. Re-approving now.

@macchiati macchiati marked this pull request as ready for review December 9, 2025 19:04
@macchiati
Copy link
Member Author

@pedberg-icu If you have time to look this over this morning, that would be great. I think it is very low-risk.

@macchiati macchiati merged commit bd31250 into main Dec 9, 2025
20 checks passed
@macchiati macchiati deleted the CLDR-19106-Check-for-empty-datetimeformats branch December 9, 2025 19:10
Copy link
Contributor

@pedberg-icu pedberg-icu left a comment

Choose a reason for hiding this comment

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

LGTM

pedberg-icu pushed a commit to pedberg-icu/cldr that referenced this pull request Dec 9, 2025
@AEApple
Copy link
Contributor

AEApple commented Dec 9, 2025

The only question I really had was that I thought yue and zh-Hant tend to prefer thin spaces?

@macchiati
Copy link
Member Author

I was debating between thin space, ascii space, and fat space (aka full-width). I went with what zh.xml had (ascii).

pedberg-icu pushed a commit that referenced this pull request Dec 10, 2025
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.

5 participants