Add new jpanyear numbering system

Description

: added "spellout-numbering-year" in rbnf/ja.xml to support year numbering using 元 for year 1.

Now : requests using this numbering system for the year in the standard Japanese-calendar date formats (at least full/long/medium) for locale "ja".

To do this we need to add a new BCP47 numbering system key in common/bcp47/number.xml, a definition in common/supplemental/numberingSystems.xml, key names and appropriate validity info. This is similar to what was done to add "hanidays" for Chinese-calendar date formats to locles "zh" and "zh_Hant" per : (in that case we also had to add the numbering system, which we already have in this case).

xpath

None

locale

None

Activity

Show:
TracBot
May 9, 2019, 7:41 PM
Trac Comment 3 by —2019-02-21T02:19:01.074Z

Hm, it turned out that "spellout-numbering-year" in ja.xml produced 元, 二, 三, 四, ... 十, 十一, 十二, ... which is not what we want.

I added a new "spellout-numbering-year-latn" in ja.xml that produces 元 2, 3, 4, 5 ... and mapped numbering system "jpanyear" to that instead.

TracBot
May 9, 2019, 7:41 PM
Trac Comment 5 by —2019-02-21T07:57:59.070Z

This kind of goes counter to normal RBNF. Only 1 is defined. Everything else is just a decimal digit. The range is so limited that it could be handled by an if statement. I wish there was a better way to implement this than putting it next to the rest of the RBNF rules.

TracBot
May 9, 2019, 7:41 PM
Trac Comment 5.6 by —2019-02-21T17:21:59.894Z

Replying to (Comment 5 grhoten):

This kind of goes counter to normal RBNF. Only 1 is defined. Everything else is just a decimal digit. The range is so limited that it could be handled by an if statement. I wish there was a better way to implement this than putting it next to the rest of the RBNF rules.

I agree, but we need to have this as a named numbering system that can be specified in API to override the behavior of a date format field. It would be far easier to implement (for formatting and parsing) as a pure hack in ICU code, but then CLDR-only consumers would not get the support...

Priority

critical

Assignee

Peter Edberg

Reporter

Peter Edberg

Reviewer

John Emmons

Labels

Components

Fix versions

phase

rc
Configure