CLDR Ticket #10118(closed spec: fixed)
Change spec description of field widths for input skeleton symbols for hour
|Reported by:||pedberg||Owned by:||pedberg|
Description (last modified by pedberg) (diff)
The current spec description of hour field input skeleton symbols j, J, and C has problems:
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
- 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
- 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
- Status changed from reviewing to reviewfeedback
- Status changed from reviewfeedback to reviewing