Make datetime styles (lengths) map to skeletons instead of patterns


The XML for datetime styles/lengths currently looks something like this:

Under the dateFormatLength element, I would like to propose changing `<pattern>` to `<skeleton>`. In this case, we would end up with something like,

The skeleton can then be mapped to the pattern using `<availableFormats>`, in this case with an exact match.

Why? In ECMAScript, we have an active proposal driven by Mozilla to make dateStyle/timeStyle (short/medium/long/full) a first-class citizen in JavaScript. However, we have encountered several issues during the implementation, such as ICU-20710, as well as a desire to be able to use dateStyle/timeStyle but omit certain fields. This can be done elegantly using the skeleton, but would require much more work to do it using the pattern.






Shane Carr
3 days ago

What are the next steps on this issue, given that the data submission deadline is rapidly approaching?

Shane Carr
May 1, 2021, 2:25 AM

Who owns the next action item for this issue?

Peter Edberg
April 28, 2021, 4:37 PM

Need test that supplied skeleton generates the pattern from the exiusting availableFormats

Mark Davis
April 28, 2021, 4:35 PM

Mark Davis
April 13, 2021, 10:03 PM

Just add skeleton field …

That sounds like a good migration path. By adding a unit test that the skeleton produces the pattern, we can ensure that they are in sync in each release.

That would also go for those locales that don’t have any availableFormat data; we would add the 4 mappings from skeleton to pattern to ensure that they are in sync.

For the future, we can migrate to only collecting the availableFormat data, and eventually we could remove the stock pattern data.

Your pinned fields
Click on the next to a field label to start pinning.




Peter Edberg


Shane Carr

Fix versions