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

CLDR Ticket #10118(closed spec: fixed)

Opened 3 weeks ago

Last modified 11 days ago

Change spec description of field widths for input skeleton symbols for hour

Reported by: pedberg Owned by: pedberg
Component: datetime Data Locale:
Phase: spec-beta Review: mark
Weeks: Data Xpath:
Xref:

ticket:8862

ticket:9250

ticket:8944

Description (last modified by pedberg) (diff)

The current spec description of hour field input skeleton symbols j, J, and C has problems:
http://www.unicode.org/reports/tr35/tr35-45/tr35-dates.html#dfst-hour

These symbols are intended to map to a field of hour field symbols (one of H, h, K, k), optionally (depending on locale) combined with a field of day period symbols (one of a, b, B). In the result of that mapping, there are two different widths to consider:

  • The width of the hour field, which may be 1 or 2 (H or HH, h or hh, etc.).
  • The width of any associated day period symbol field, which may correspond to symbol widths abbreviated, wide, or narrow.

The current spec describes how to control the width of the latter, but not the former, which is arguably more important and was originally the only width that could be controlled when using the j or J symbols - see the spec for CLDR 27: [http://www.unicode.org/reports/tr35/tr35-39/tr35-dates.html#Date_Field_Symbol_Table}

How did we get here?

  • Pattern symbols for day periods were added in CLDR 28; this included the normal symbols b abd B, along with the input skeleton C which was originally added as a dayPeriod symbol, and assigned width variants like other dayPeriod symbols: http://www.unicode.org/reports/tr35/tr35-40/tr35-dates.html#Date_Field_Symbol_Table
    • This was done per cldrbug 8862: (created 2015-08-12) via r12034 (made 2015-09-03)
    • It may have related to a TC discussion 2015-08-05 on day period widths
  • In CLDR 29, the placement of input skeleton C in the dayPeriods section was recognized as an error, and it was moved to the section on skeleton symbols for hours, keeping its width variants; at the same time, similar width variants were introduced for j and J: http://www.unicode.org/reports/tr35/tr35-42/tr35-dates.html#Date_Field_Symbol_Table
  • However, ICU never implemented this aspect of the spec. Currently in ICU, the width of the j/J/C fields only affects the number of resulting H/h/K/k characters; the width of any day period symbol field resulting from j/J/C is always 1 => abbreviated.

How to fix this?

  • Per TC discussion 2017-03-08, the solution is as follows for mapping the width of any j/J/C field to widths of corresponding hour and dayPeriod fields:
    • An odd length for j/J/C field means a length of 1 for the H/h/K/k field; an even length for j/J/C field means a length of 2 for the H/h/K/k field
    • A length of 1..2 for the j/J/C field means to use an abbreviated form for any associated day period symbol
    • A length of 3..4 for the j/J/C field means to use a wide form for any associated day period symbol
    • A length of 5..6 for the j/J/C field means to use a narrow form for any associated day period symbol

Attachments

Change History

comment:1 Changed 3 weeks ago by pedberg

  • Description modified (diff)

comment:2 Changed 3 weeks ago by pedberg

  • Xref changed from 8862, 9250 to 8862, 9250, 8944

comment:3 Changed 3 weeks ago by pedberg

  • Summary changed from Change spec description of field widths for input skeleton characters to Change spec description of field widths for input skeleton symbols for hour

comment:4 Changed 3 weeks ago by pedberg

  • Status changed from new to reviewing
  • Review set to mark

I realized for J that we do not need to allow control of dayPeriod width in addition to hour field width, since J is specified to NOT use a dayPeriod symbol.

Here is the result of these changes: http://unicode.org/repos/cldr/trunk/specs/ldml/tr35-dates.html#dfst-hour (may need to reload page to see updates)

comment:5 follow-up: ↓ 6 Changed 2 weeks ago by mark

  • Status changed from reviewing to reviewfeedback
  1. One suggestion: add more examples.

8
8 AM

=>

8
8 AM

13
1 PM

  1. What do you think of using artificial abbreviations just to make the distinction clear, and have a note in the description above?

"Some of the examples are artificial, in order to make a distinction or have a form that wouldn't normally occur in English."

....

CC8 (morning)Input skeleton symbol...

comment:6 in reply to: ↑ 5 Changed 12 days ago by pedberg

  • Status changed from reviewfeedback to reviewing

Replying to mark:

  1. One suggestion: add more examples.


Added

  1. What do you think of using artificial abbreviations just to make the distinction clear, and have a note in the description above?

"Some of the examples are artificial, in order to make a distinction or have a form that wouldn't normally occur in English."


Added some made-up examples. I don't think we need to have a special additional note, we already say at the top of the table: "The examples in the table below are merely illustrative and may not reflect current actual data."

comment:7 Changed 11 days ago by mark

  • Status changed from reviewing to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.