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

CLDR Ticket #8584(accepted data)

Opened 3 years ago

Last modified 3 years ago

Fix problem with date format patterns not allowing different numbers.

Reported by: mark Owned by: pedberg
Component: datetime Data Locale:
Phase: dsub Review:
Weeks: Data Xpath:


From an internal report:

It seems that despite using ULocale with numbers=latn set, the patterns retrieved for e.g. "Mdyy" include RLM (Right to left marker) unicode control characters which effectively forces the "d/M/y" pattern to be displayed from right to left (day will be on the right). That's the correct way when native arabic-digits are used but is incorrect when ASCII digits are used.

E.g. the return value of:
DateTimePatternGenerator.getInstance(ULocale.forLocale(ARABIC).setKeywordValue("numbers", "latn")).getBestPattern("Mdy")

How do I set things up so that we get "d/M/y" without the RLM characters?

There are a couple of alternative ways to handle this. For numbers, we have alternate patterns/symbols depending on the number system. That would, however, be really painful with the number of date patterns we have.

If the only problem is the presence of the RLMs, then an alternative would be to spec for implementations that when AN digits don't appear in a pattern, that RLMs are removed. That would be a simple change. The question is whether that handles all the cases or not.


Change History

comment:1 Changed 3 years ago by mark

  • Status changed from new to accepted
  • Component changed from unknown to datetime
  • Priority changed from assess to major
  • Milestone changed from UNSCH to 28
  • Owner changed from anybody to pedberg
  • Type changed from unknown to data

comment:2 Changed 3 years ago by pedberg

Ca't remove the marks for non-AN numbers, because they are often needed mainly for EN numbers.

One possible solution is to define a new number symbol that would be empty in most cases, but would have a direction mark in some number systems and some locales, and define a pattern char that allows this to be used in date formats.

comment:3 Changed 3 years ago by pedberg

  • Phase changed from dsub to rc

comment:4 Changed 3 years ago by pedberg

  • Phase changed from rc to dsub
  • Milestone changed from 28 to 29

comment:5 Changed 3 years ago by emmons

  • Milestone changed from 29 to upcoming

Auto move of all 29 -> upcoming


Add a comment

Modify Ticket

as accepted

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

Note: See TracTickets for help on using tickets.