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

CLDR Ticket #10036(reviewing data)

Opened 5 months ago

Last modified 4 weeks ago

Need availableFormats for every locale using flexible day periods B

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

ticket:9820

ticket:10118

ticket:10233

ticket:10312

Description

In many locales, flexible day periods (pattern char B) do not necessarily occur in the same position in a time pattern that AM/PM markers do (pattern char a). We should have at least a basic time pattern using B in root in in most locales. This will enable the Survey Tool to properly display examples for flexible time periods.

This may depend on fixes to ICU DateTImePatternGenerator handling of B.

Attachments

Change History

comment:1 Changed 4 months ago by mark

  • Owner changed from anybody to pedberg
  • Status changed from new to accepted
  • Milestone changed from UNSCH to 32

comment:2 Changed 8 weeks ago by pedberg

  • Xref changed from 9820 to 9820 10233

This depends on specifying behavior for B and b in skeletons per cldrbug 10233: and also making a corresponding ICU fix.

comment:3 Changed 5 weeks ago by pedberg

  • Status changed from accepted to reviewing
  • Xref changed from 9820 10233 to 9820 10118 10233 10312
  • Review set to mark

Well, this turned out to be lot of work, mostly getting ICU to behave correctly with respect to day periods.

  1. In ICU DateTimePatternGenerator, I had to implement two pieces of functionality and other fixes:
  2. In ICU DayPeriodRules there was an infinite loop causing problems for CLDR, and described in http://bugs.icu-project.org/trac/ticket/13215.
  3. I have rolled fixed versions of both DateTimePatternGenerator and DayPeriodRules as overrides into CLDR, and filed x=cldrbug 10312: to remove them next time we update the ICU4J libraries with vesions that have the fixes.
  4. Then I added availableFormats items for skeletons Bh, Bhm, Bhms, EBhm, EBhms in root, en, and several locales in which dayPeriods typically go before h (because in these locales fallback to the root patterns would produce incorrect behavior).
  5. I updated coverage and PathHeader for these. Note that we need to add these (and other availableFormats time patterns) in gregorian, generic, and chinese, because there is no inheritance of availableFormats time patterns to root for generic and chinese.
  6. I also updated CheckDates.java to allow dayPeriods in the time formats.

comment:4 Changed 4 weeks ago by pedberg

A few more changes, based on TC discussion 2017-05-24:

  1. (follow-on from 5 above) Extended coverage of availableFormats time patterns in generic and chinese calendars to include all time patterns.
  2. Made the SurveyTool examples for dayPeriods use a format specified for skeleton Bhm if available (instead of just using the format for hm ant then replacing the 'a' with the dayPeriod). If no availableFormats item for Bhm is available, it falls back to the previous behavior. One hack here is the method for determining in ICUServiceBuilder.formatDayPeriod whether the request is for am/pm/noon/midnight (use hm) or for some other dayPeriod (try Bhm first); currently if the time to format is 0/6/12/18 it prefers hm, otherwise it prefers Bhm. There is probably a better way of doing this. Sample example links in smoketest:
  3. Made the SurveyTool examples for availableFormats items with skeletons involving Bh show examples for 3 different times of day (0700, 1325, 2300) instead of just one (1325). Sample example links in smoketest:
View

Add a comment

Modify Ticket

Action
as reviewing
Author


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

 
Note: See TracTickets for help on using tickets.