[threeten-dev] print Era with Chronology overriding
Xueming Shen
xueming.shen at oracle.com
Wed Jan 30 12:43:35 PST 2013
It also appears it is still DTF.withChrono(...), instead of DTF.withChronology(),
so I updated it in the same patch as well.
On 01/30/2013 12:14 PM, Xueming Shen wrote:
> Two issues here.
>
> (1) It appears the print/parse context is not passing the possible
> overriding chronology to the printerparser, so DTF.withChronology()
> does have impact the print/parse result when a specified chronology
> is preferred. This is particular an issue when the era name is different
> in the non-iso chronology, Japanese for example.
>
> (2) We are not getting "short" style era text from the provider, it
> is printed as a numeric value now.
>
> The attached webrev fixed the printing side of the issue(1) + (2).
> The era parsing is still TBD for now:-0
>
> http://cr.openjdk.java.net/~sherman/jdk8_threeten/fmtEra
>
> The attached test case generates following output, which I would
> assume is expected. (Masayoshi, Naoto?)
>
> sherman at sherman-linux:~/Workspace/310/text$ java FmtText310
> Locale = [en]
> ------Month---------
> AD January A Jan A 1
> AD February A Feb A 2
> AD March A Mar A 3
> AD April A Apr A 4
> AD May A May A 5
> AD June A Jun A 6
> AD July A Jul A 7
> AD August A Aug A 8
> AD September A Sep A 9
> AD October A Oct A 10
> AD November A Nov A 11
> AD December A Dec A 12
> ------Month cld---------
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> Heisei January H Jan H 1
> ------Month with(JapaneseChronology)---------
> Heisei January H Jan H 1
> Heisei February H Feb H 2
> Heisei March H Mar H 3
> Heisei April H Apr H 4
> Heisei May H May H 5
> Heisei June H Jun H 6
> Heisei July H Jul H 7
> Heisei August H Aug H 8
> Heisei September H Sep H 9
> Heisei October H Oct H 10
> Heisei November H Nov H 11
> Heisei December H Dec H 12
> ------Week----------
> Monday Mon M
> Tuesday Tue T
> Wednesday Wed W
> Thursday Thu T
> Friday Fri F
> Saturday Sat S
> Sunday Sun S
> ------AmPm----------
> AM AM 0
> PM PM 1
> Locale = [ja]
> ------Month---------
> 西暦 1月 A 1 A 1
> 西暦 2月 A 2 A 2
> 西暦 3月 A 3 A 3
> 西暦 4月 A 4 A 4
> 西暦 5月 A 5 A 5
> 西暦 6月 A 6 A 6
> 西暦 7月 A 7 A 7
> 西暦 8月 A 8 A 8
> 西暦 9月 A 9 A 9
> 西暦 10月 A 10 A 10
> 西暦 11月 A 11 A 11
> 西暦 12月 A 12 A 12
> ------Month cld---------
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> 平成 1月 H 1 H 1
> ------Month with(JapaneseChronology)---------
> 平成 1月 H 1 H 1
> 平成 2月 H 2 H 2
> 平成 3月 H 3 H 3
> 平成 4月 H 4 H 4
> 平成 5月 H 5 H 5
> 平成 6月 H 6 H 6
> 平成 7月 H 7 H 7
> 平成 8月 H 8 H 8
> 平成 9月 H 9 H 9
> 平成 10月 H 10 H 10
> 平成 11月 H 11 H 11
> 平成 12月 H 12 H 12
> ------Week----------
> 月曜日 月 月
> 火曜日 火 火
> 水曜日 水 水
> 木曜日 木 木
> 金曜日 金 金
> 土曜日 土 土
> 日曜日 日 日
> ------AmPm----------
> 午前 午前 0
> 午後 午後 1
>
More information about the threeten-dev
mailing list