[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search

CLDR Ticket #11313(closed: invalid)

Opened 6 months ago

Last modified 5 months ago

Add some new date skeletons?

Reported by: llh1367115771@… Owned by: anybody
Component: datetime Data Locale:
Phase: dsub Review:
Weeks: Data Xpath:


Hi, I'm recently working on a page on which users can choose the display format of date/time.

There're some skeletons I need, but cannot be found in CLDR dataset, so could you add some skeletons in dataset?

The required skeletons are listed below:

PS: I've thought about another alternative solution which is to concat strings like: 'yyyy' + '/' + 'MM' + '/' + 'dd', but it'll cause the localization problem.

Thanks a lot!


Change History

comment:1 Changed 5 months ago by pedberg

  • Status changed from new to closed
  • Resolution set to invalid

I think you may be misunderstanding the way that skeletons work.

  1. The ordering of a fields is irrelevant in a skeleton; a skeleton Mdy is the same as ydM. Either one will map to the natural order of date fields in a particular locale; in some locales that might be y/MM/dd, in others it might be M/d/y.
  2. A skeleton would typically only have y or yy (unless you are trying to map requests for yyyy to patterns with yy, say). 'y' means means use as many digits as necessary for the year; yyyy means always use at least 4, zero-padding if necessary. So for the year of Charlemagne's death, y will produce 814, while yyyy will produce 0814.
  3. Skeletons and corresponding patterns are automatically expanded to match the length of request fields (except across numeric/alphabetic field type boundaries). So for example of you have a skeleton->pattern like yMd -> "M/d/y" and the request is for a skeleton yMMdd, that skeleton/pattern is automatically expanded to become yMMdd -> "MM/dd/y" to satisfy the request. It is not necessary to explicitly specify the second one.
  4. 'a' is typically ignored in skeletons. A suitable day period pattern character like a is automatically generated in the pattern if the skeleton includes h or K.

For more information, see https://www.unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems


Add a comment

Modify Ticket

as closed
Next status will be 'new'
Next status will be 'closed'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.