fMainType = "gregorian";
fFallbackType = null;
} else {
- // TODO: Until CLDR supports "dangi" calendar type
- if (type.equalsIgnoreCase("dangi")) {
- type = "chinese";
- }
fMainType = type;
fFallbackType = "gregorian";
}
// 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
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);
}
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) {
version https://git-lfs.github.com/spec/v1
-oid sha256:3d527dc8b2d8b770c1b070b772c4680a2b0acc645e5ad050dd32968c6770afa6
-size 9833010
+oid sha256:b6f09ae8f08529e1fb68a0b6057ce99cfc1017cb5cc5929a036a5bb021370ddc
+size 9830128