From: Peter Edberg Date: Thu, 27 Jun 2013 06:16:33 +0000 (+0000) Subject: ICU-9984 (J) For DTPG, Y in skeleton should produce Y in pattern X-Git-Tag: milestone-59-0-1~2810 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a573382a0b782fb21b5886b6290fc127c5fd8878;p=icu ICU-9984 (J) For DTPG, Y in skeleton should produce Y in pattern X-SVN-Rev: 33857 --- diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java index 955a51ef5f7..9798e985515 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java @@ -1747,7 +1747,8 @@ public class DateTimePatternGenerator implements Freezable 0; --i) fieldBuilder.append(c); } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateTimeGeneratorTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateTimeGeneratorTest.java index 78611cbbcfa..98d6dbffec3 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateTimeGeneratorTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateTimeGeneratorTest.java @@ -1167,6 +1167,16 @@ public class DateTimeGeneratorTest extends TestFmwk { new TestOptionsItem( "be", "Hmm", "H.mm", DateTimePatternGenerator.MATCH_HOUR_FIELD_LENGTH ), new TestOptionsItem( "be", "HHmm", "HH.mm", DateTimePatternGenerator.MATCH_HOUR_FIELD_LENGTH ), new TestOptionsItem( "be", "hhmm", "hh.mm a", DateTimePatternGenerator.MATCH_HOUR_FIELD_LENGTH ), + // + new TestOptionsItem( "en", "yyyy", "yyyy", DateTimePatternGenerator.MATCH_NO_OPTIONS ), + new TestOptionsItem( "en", "YYYY", "YYYY", DateTimePatternGenerator.MATCH_NO_OPTIONS ), + new TestOptionsItem( "en", "U", "y", DateTimePatternGenerator.MATCH_NO_OPTIONS ), + 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 ), }; for (int i = 0; i < testOptionsData.length; ++i) {