ICU-10761 J: pre-integrate changes per cldrbug 8048: to use 'r' in chinese calendar formats

X-SVN-Rev: 37053
This commit is contained in:
Peter Edberg 2015-02-23 16:46:39 +00:00
parent aac5b528c8
commit f149f89059
4 changed files with 40 additions and 40 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:611bc5e74c2ebff8ec0d0604c0d483533423e200d7c91c099bbaaab479a85336
size 11813951
oid sha256:847e0ccaa347c084b4f8a52871942bd2493d12e2675e831ee206e86a176da7ac
size 11876902

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2001-2014, International Business Machines Corporation and *
* Copyright (C) 2001-2015, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -1199,7 +1199,7 @@ public class DateFormatRegressionTest extends com.ibm.icu.dev.test.TestFmwk {
Date d = gcal.getTime();
String dangiDateStr = fmt.format(d);
assertEquals("Bad date format", "Mo1 20, gui-si", dangiDateStr);
assertEquals("Bad date format", "Mo1 20, 2013", dangiDateStr);
}
public void TestT10110() {

View File

@ -4090,33 +4090,33 @@ public class DateFormatTest extends com.ibm.icu.dev.test.TestFmwk {
}
};
final MonthPatternItem[] items = {
new MonthPatternItem( "root@calendar=chinese", DateFormat.LONG, "ren-chen M04 2", "ren-chen M04bis 2", "ren-chen M05 2" ),
new MonthPatternItem( "root@calendar=chinese", DateFormat.SHORT, "29-04-02", "29-04bis-02", "29-05-02" ),
new MonthPatternItem( "root@calendar=chinese", DateFormat.LONG, "2012(ren-chen) M04 2", "2012(ren-chen) M04bis 2", "2012(ren-chen) M05 2" ),
new MonthPatternItem( "root@calendar=chinese", DateFormat.SHORT, "2012-04-02", "2012-04bis-02", "2012-05-02" ),
new MonthPatternItem( "root@calendar=chinese", -1, "29-4-2", "29-4bis-2", "29-5-2" ),
new MonthPatternItem( "root@calendar=chinese", -2, "78x29-4-2", "78x29-4bis-2", "78x29-5-2" ),
new MonthPatternItem( "root@calendar=chinese", -3, "ren-chen-4-2", "ren-chen-4bis-2", "ren-chen-5-2" ),
new MonthPatternItem( "root@calendar=chinese", -4, "ren-chen M04 2", "ren-chen M04bis 2", "ren-chen M05 2" ),
new MonthPatternItem( "en@calendar=gregorian", -3, "2012-4-22", "2012-5-22", "2012-6-20" ),
new MonthPatternItem( "en@calendar=chinese", DateFormat.LONG, "Month4 2, ren-chen", "Month4bis 2, ren-chen", "Month5 2, ren-chen" ),
new MonthPatternItem( "en@calendar=chinese", DateFormat.SHORT, "4/2/29", "4bis/2/29", "5/2/29" ),
new MonthPatternItem( "zh@calendar=chinese", DateFormat.LONG, "\u58EC\u8FB0\u5E74\u56DB\u6708\u521D\u4E8C",
"\u58EC\u8FB0\u5E74\u95F0\u56DB\u6708\u521D\u4E8C",
"\u58EC\u8FB0\u5E74\u4E94\u6708\u521D\u4E8C" ),
new MonthPatternItem( "zh@calendar=chinese", DateFormat.SHORT, "\u58EC\u8FB0-4-2", "\u58EC\u8FB0-\u95F04-2", "\u58EC\u8FB0-5-2" ),
new MonthPatternItem( "en@calendar=chinese", DateFormat.LONG, "Month4 2, 2012(ren-chen)", "Month4bis 2, 2012(ren-chen)", "Month5 2, 2012(ren-chen)" ),
new MonthPatternItem( "en@calendar=chinese", DateFormat.SHORT, "4/2/2012", "4bis/2/2012", "5/2/2012" ),
new MonthPatternItem( "zh@calendar=chinese", DateFormat.LONG, "2012\u58EC\u8FB0\u5E74\u56DB\u6708\u521D\u4E8C",
"2012\u58EC\u8FB0\u5E74\u95F0\u56DB\u6708\u521D\u4E8C",
"2012\u58EC\u8FB0\u5E74\u4E94\u6708\u521D\u4E8C" ),
new MonthPatternItem( "zh@calendar=chinese", DateFormat.SHORT, "2012-4-2", "2012-\u95F04-2", "2012-5-2" ),
new MonthPatternItem( "zh@calendar=chinese", -3, "\u58EC\u8FB0-4-2",
"\u58EC\u8FB0-\u95F04-2",
"\u58EC\u8FB0-5-2" ),
new MonthPatternItem( "zh@calendar=chinese", -4, "\u58EC\u8FB0 \u56DB\u6708 2",
"\u58EC\u8FB0 \u95F0\u56DB\u6708 2",
"\u58EC\u8FB0 \u4E94\u6708 2" ),
new MonthPatternItem( "zh_Hant@calendar=chinese", DateFormat.LONG, "\u58EC\u8FB0\u5E74\u56DB\u6708\u521D\u4E8C",
"\u58EC\u8FB0\u5E74\u958F\u56DB\u6708\u521D\u4E8C",
"\u58EC\u8FB0\u5E74\u4E94\u6708\u521D\u4E8C" ),
new MonthPatternItem( "zh_Hant@calendar=chinese", DateFormat.SHORT, "\u58EC\u8FB0/4/2", "\u58EC\u8FB0/\u958F4/2", "\u58EC\u8FB0/5/2" ),
new MonthPatternItem( "zh_Hant@calendar=chinese", DateFormat.LONG, "2012\u58EC\u8FB0\u5E74\u56DB\u6708\u521D\u4E8C",
"2012\u58EC\u8FB0\u5E74\u958F\u56DB\u6708\u521D\u4E8C",
"2012\u58EC\u8FB0\u5E74\u4E94\u6708\u521D\u4E8C" ),
new MonthPatternItem( "zh_Hant@calendar=chinese", DateFormat.SHORT, "2012/4/2", "2012/\u958F4/2", "2012/5/2" ),
new MonthPatternItem( "fr@calendar=chinese", DateFormat.LONG, "2 s\u00ECyu\u00E8 ren-chen", "2 s\u00ECyu\u00E8bis ren-chen", "2 w\u01D4yu\u00E8 ren-chen" ),
new MonthPatternItem( "fr@calendar=chinese", DateFormat.SHORT, "2/4/29", "2/4bis/29", "2/5/29" ),
new MonthPatternItem( "en@calendar=dangi", DateFormat.LONG, "Month3bis 2, ren-chen", "Month4 2, ren-chen", "Month5 1, ren-chen" ),
new MonthPatternItem( "en@calendar=dangi", DateFormat.SHORT, "3bis/2/29", "4/2/29", "5/1/29" ),
new MonthPatternItem( "en@calendar=dangi", DateFormat.LONG, "Month3bis 2, 2012(ren-chen)", "Month4 2, 2012(ren-chen)", "Month5 1, 2012(ren-chen)" ),
new MonthPatternItem( "en@calendar=dangi", DateFormat.SHORT, "3bis/2/2012", "4/2/2012", "5/1/2012" ),
new MonthPatternItem( "en@calendar=dangi", -2, "78x29-3bis-2", "78x29-4-2", "78x29-5-1" ),
new MonthPatternItem( "ko@calendar=dangi", DateFormat.LONG, "\uC784\uC9C4\uB144 \uC7243\uC6D4 2\uC77C",
"\uC784\uC9C4\uB144 4\uC6D4 2\uC77C",

View File

@ -461,19 +461,19 @@ public class DateTimeGeneratorTest extends TestFmwk {
new String[] {"JJmm", "23:58"},
new ULocale("zh@calendar=chinese"),
new String[] {"yM", "\u620A\u5BC5\u5E74\u51AC\u6708"},
new String[] {"yMMM", "\u620A\u5BC5\u5E74\u51AC\u6708"},
new String[] {"yMd", "\u620A\u5BC5\u5E74\u51AC\u670826\u65E5"},
new String[] {"yMMMd", "\u620A\u5BC5\u5E74\u51AC\u670826\u65E5"},
new String[] {"yM", "1998\u620A\u5BC5\u5E74\u51AC\u6708"},
new String[] {"yMMM", "1998\u620A\u5BC5\u5E74\u51AC\u6708"},
new String[] {"yMd", "1998\u5E74\u51AC\u670826"},
new String[] {"yMMMd", "1998\u5E74\u51AC\u670826"},
new String[] {"Md", "11-26"},
new String[] {"MMMd", "\u51AC\u670826\u65E5"},
new String[] {"MMMMd", "\u51AC\u670826\u65E5"},
new String[] {"yQQQ", "\u620A\u5BC5\u5E74\u7B2C\u56DB\u5B63\u5EA6"},
new String[] {"yQQQ", "1998\u620A\u5BC5\u5E74\u7B2C\u56DB\u5B63\u5EA6"},
new String[] {"hhmm", "\u4E0B\u534811:58"},
new String[] {"HHmm", "23:58"},
new String[] {"jjmm", "\u4E0B\u534811:58"},
new String[] {"mmss", "58:59"},
new String[] {"yyyyMMMM", "\u620A\u5BC5\u5E74\u51AC\u6708"},
new String[] {"yyyyMMMM", "1998\u620A\u5BC5\u5E74\u51AC\u6708"},
new String[] {"MMMEd", "\u51AC\u670826\u65E5\u5468\u4E09"},
new String[] {"Ed", "26\u65E5\u5468\u4E09"},
new String[] {"jmmssSSS", "\u4E0B\u534811:58:59.123"},
@ -1219,22 +1219,22 @@ public class DateTimeGeneratorTest extends TestFmwk {
new TestOptionsItem( "en@calendar=japanese", "yyyy", "y G", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=japanese", "YYYY", "Y G", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=japanese", "U", "y G", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "yyyy", "U", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "YYYY", "Y", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "U", "U", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "Gy", "U", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "GU", "U", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "ULLL", "MMM U", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "yMMM", "MMM U", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "GUMMM", "MMM U", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "yyyy", "U\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "YYYY", "Y\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "U", "U\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "Gy", "U\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "GU", "U\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "ULLL", "U\u5E74MMM", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "yMMM", "U\u5E74MMM", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "GUMMM", "U\u5E74MMM", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "yyyy", "r(U)", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "YYYY", "Y(Y)", DateTimePatternGenerator.MATCH_NO_OPTIONS ), // not a good result, want r(Y) or r(U)
new TestOptionsItem( "en@calendar=chinese", "U", "r(U)", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "Gy", "r(U)", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "GU", "r(U)", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "ULLL", "MMM U", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "yMMM", "MMM r(U)", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "en@calendar=chinese", "GUMMM", "MMM r(U)", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "yyyy", "rU\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "YYYY", "YY\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ), // not a good result, want r(Y) or r(U)
new TestOptionsItem( "zh@calendar=chinese", "U", "rU\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "Gy", "rU\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "GU", "rU\u5E74", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "ULLL", "U\u5E74MMM", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "yMMM", "rU\u5E74MMM", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
new TestOptionsItem( "zh@calendar=chinese", "GUMMM", "rU\u5E74MMM", DateTimePatternGenerator.MATCH_NO_OPTIONS ),
};
for (int i = 0; i < testOptionsData.length; ++i) {