]> granicus.if.org Git - icu/commitdiff
ICU-9255 Merged ICU4C trunk r32468 locale data including Dangi calendar format data...
authorYoshito Umaoka <y.umaoka@gmail.com>
Fri, 28 Sep 2012 21:17:44 +0000 (21:17 +0000)
committerYoshito Umaoka <y.umaoka@gmail.com>
Fri, 28 Sep 2012 21:17:44 +0000 (21:17 +0000)
X-SVN-Rev: 32469

icu4j/main/classes/core/src/com/ibm/icu/impl/CalendarData.java
icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java
icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java
icu4j/main/classes/core/src/com/ibm/icu/util/Calendar.java
icu4j/main/shared/data/icudata.jar

index ee5b16af9d7b5eaca1191d3523606027b6a6297a..3e59dd9377ef66c825b9a55b2872637917b41593 100644 (file)
@@ -34,10 +34,6 @@ public class CalendarData {
             fMainType = "gregorian";
             fFallbackType = null;
         } else {
-            // TODO: Until CLDR supports "dangi" calendar type
-            if (type.equalsIgnoreCase("dangi")) {
-                type = "chinese";
-            }
             fMainType = type;
             fFallbackType = "gregorian";
         }
index 25b4526d8c311ca14d8c6ff3061ef850d292835f..657c6b98bc8cb5bd4fb7a91c9d6bac8ad0680051 100644 (file)
@@ -1142,7 +1142,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
     // We may need to deescalate this API to @internal.
     protected void initializeData(ULocale desiredLocale, String type)
     {
-        String key = desiredLocale.toString() + "+" + type;
+        String key = desiredLocale.getBaseName() + "+" + type;
         DateFormatSymbols dfs = DFSCACHE.get(key);
         if (dfs == null) {
             // Initialize data from scratch put a clone of this instance into the cache
index d7a42e8fc69dad63c8ab67c5bdc38c152f7aa585..1d13c91885f209228e808239646990f1873487f3 100644 (file)
@@ -185,11 +185,6 @@ public class DateTimePatternGenerator implements Freezable<DateTimePatternGenera
             calendarTypeToUse = "gregorian"; // fallback
         }
 
-        // TODO: Until CLDR supports "dangi" calendar type
-        if (calendarTypeToUse.equalsIgnoreCase("dangi")) {
-            calendarTypeToUse = "chinese";
-        }
-
         // Get data for that calendar
         ICUResourceBundle calBundle = rb.getWithFallback("calendar");
         ICUResourceBundle calTypeBundle = calBundle.getWithFallback(calendarTypeToUse);
index 01be745b803a4800379114bffbd70b942485c4c0..6791d59d95d6f405b0d230b3a93a32dcab3b508c 100644 (file)
@@ -3504,12 +3504,13 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
         }
         private static PatternData make(Calendar cal, ULocale loc) {
             // First, try to get a pattern from PATTERN_CACHE
-            String key = loc.toString() + cal.getType();
+            String calType = cal.getType();
+            String key = loc.getBaseName() + "+" + calType;
             PatternData patternData = PATTERN_CACHE.get(key);
             if (patternData == null) {
                 // Cache missed.  Get one from bundle
                 try {
-                    CalendarData calData = new CalendarData(loc, cal.getType());
+                    CalendarData calData = new CalendarData(loc, calType);
                     patternData = new PatternData(calData.getDateTimePatterns(),
                                                   calData.getOverrides());
                 } catch (MissingResourceException e) {
index d7548935c5b5f1b511cd64eaba3f773c65514f46..8a0a83039e47f981ab3a61a52a1e980cb7408bf5 100755 (executable)
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3d527dc8b2d8b770c1b070b772c4680a2b0acc645e5ad050dd32968c6770afa6
-size 9833010
+oid sha256:b6f09ae8f08529e1fb68a0b6057ce99cfc1017cb5cc5929a036a5bb021370ddc
+size 9830128