ICU-8811 Removed the logic for supporting short commonly used time zone names.

X-SVN-Rev: 30668
This commit is contained in:
Yoshito Umaoka 2011-09-15 20:38:26 +00:00
parent 737d129645
commit 93cb17f386
8 changed files with 75 additions and 100 deletions

View File

@ -1729,7 +1729,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo,
if (patternCharIndex == UDAT_TIMEZONE_FIELD) {
if (count < 4) {
// "z", "zz", "zzz"
tzFormat()->format(UTZFMT_STYLE_SPECIFIC_SHORT_COMMONLY_USED, tz, date, zoneString);
tzFormat()->format(UTZFMT_STYLE_SPECIFIC_SHORT, tz, date, zoneString);
} else {
// "zzzz"
tzFormat()->format(UTZFMT_STYLE_SPECIFIC_LONG, tz, date, zoneString);
@ -3076,7 +3076,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC
switch (patternCharIndex) {
case UDAT_TIMEZONE_FIELD:
if (count < 4) {
tzFormat()->parse(UTZFMT_STYLE_SPECIFIC_SHORT_COMMONLY_USED, text, tmpPos, parsedID, &parsedTimeType);
tzFormat()->parse(UTZFMT_STYLE_SPECIFIC_SHORT, text, tmpPos, parsedID, &parsedTimeType);
} else {
tzFormat()->parse(UTZFMT_STYLE_SPECIFIC_LONG, text, tmpPos, parsedID, &parsedTimeType);
}

View File

@ -140,9 +140,6 @@ TimeZoneFormatImpl::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate
case UTZFMT_STYLE_SPECIFIC_SHORT:
formatSpecific(tz, UTZNM_SHORT_STANDARD, UTZNM_SHORT_DAYLIGHT, date, name, timeType);
break;
case UTZFMT_STYLE_SPECIFIC_SHORT_COMMONLY_USED:
formatSpecific(tz, UTZNM_SHORT_STANDARD_COMMONLY_USED, UTZNM_SHORT_DAYLIGHT_COMMONLY_USED, date, name, timeType);
break;
}
return name;
}
@ -179,9 +176,6 @@ TimeZoneFormatImpl::parse(UTimeZoneFormatStyle style, const UnicodeString& text,
case UTZFMT_STYLE_SPECIFIC_SHORT:
types = UTZNM_SHORT_STANDARD | UTZNM_SHORT_DAYLIGHT;
break;
case UTZFMT_STYLE_SPECIFIC_SHORT_COMMONLY_USED:
types = UTZNM_SHORT_STANDARD_COMMONLY_USED | UTZNM_SHORT_DAYLIGHT_COMMONLY_USED;
break;
}
UTimeZoneTimeType parsedTimeType = UTZFMT_TIME_TYPE_UNKNOWN;
@ -226,12 +220,10 @@ TimeZoneFormatImpl::parse(UTimeZoneFormatStyle style, const UnicodeString& text,
switch (nameType) {
case UTZNM_LONG_STANDARD:
case UTZNM_SHORT_STANDARD:
case UTZNM_SHORT_STANDARD_COMMONLY_USED:
parsedTimeType = UTZFMT_TIME_TYPE_STANDARD;
break;
case UTZNM_LONG_DAYLIGHT:
case UTZNM_SHORT_DAYLIGHT:
case UTZNM_SHORT_DAYLIGHT_COMMONLY_USED:
parsedTimeType = UTZFMT_TIME_TYPE_DAYLIGHT;
break;
default:

View File

@ -25,8 +25,7 @@ typedef enum UTimeZoneFormatStyle {
UTZFMT_STYLE_GENERIC_LONG,
UTZFMT_STYLE_GENERIC_SHORT,
UTZFMT_STYLE_SPECIFIC_LONG,
UTZFMT_STYLE_SPECIFIC_SHORT,
UTZFMT_STYLE_SPECIFIC_SHORT_COMMONLY_USED
UTZFMT_STYLE_SPECIFIC_SHORT
} UTimeZoneFormatStyle;
typedef enum UTimeZoneTimeType {

View File

@ -637,7 +637,7 @@ TimeZoneGenericNames::formatGenericNonLocationName(const TimeZone& tz, UTimeZone
}
if (useStandard) {
UTimeZoneNameType stdNameType = (nameType == UTZNM_LONG_GENERIC)
? UTZNM_LONG_STANDARD : UTZNM_SHORT_STANDARD_COMMONLY_USED;
? UTZNM_LONG_STANDARD : UTZNM_SHORT_STANDARD;
UnicodeString stdName;
fTimeZoneNames->getDisplayName(tzID, stdNameType, date, stdName);
if (!stdName.isEmpty()) {
@ -868,7 +868,8 @@ TimeZoneGenericNames::findBestMatch(const UnicodeString& text, int32_t start, ui
int32_t bestMatchLen = 0;
UTimeZoneTimeType bestMatchTimeType = UTZFMT_TIME_TYPE_UNKNOWN;
UnicodeString bestMatchTzID;
UBool isLongStandard = FALSE; // workaround - see the comments below
UBool isLongStandard = FALSE; // workaround - see the comments below
UBool isStandard = FALSE; // TODO: Temporary hack (on hack) for short standard name/location name conflict (found in zh_Hant), should be removed after CLDR 21m1 integration
if (tznamesMatches != NULL) {
UnicodeString mzID;
@ -887,12 +888,11 @@ TimeZoneGenericNames::findBestMatch(const UnicodeString& text, int32_t start, ui
switch (nameType) {
case UTZNM_LONG_STANDARD:
isLongStandard = TRUE;
case UTZNM_SHORT_STANDARD_COMMONLY_USED:
case UTZNM_SHORT_STANDARD: // this one is never used for generic, but just in case
case UTZNM_SHORT_STANDARD: // this one is never used for generic, but just in case
isStandard = TRUE; // TODO: Remove this later, see the comments above.
bestMatchTimeType = UTZFMT_TIME_TYPE_STANDARD;
break;
case UTZNM_LONG_DAYLIGHT:
case UTZNM_SHORT_DAYLIGHT_COMMONLY_USED:
case UTZNM_SHORT_DAYLIGHT: // this one is never used for generic, but just in case
bestMatchTimeType = UTZFMT_TIME_TYPE_DAYLIGHT;
break;
@ -914,11 +914,24 @@ TimeZoneGenericNames::findBestMatch(const UnicodeString& text, int32_t start, ui
// and the location name. When the match is a long standard name,
// then we need to check if the name is same with the location name.
// This is probably a data error or a design bug.
/*
if (!isLongStandard) {
tzID.setTo(bestMatchTzID);
timeType = bestMatchTimeType;
return bestMatchLen;
}
*/
// TODO The deprecation of commonlyUsed flag introduced the name
// conflict not only for long standard names, but short standard names too.
// These short names (found in zh_Hant) should be gone once we clean
// up CLDR time zone display name data. Once the short name conflict
// problem (with location name) is resolved, we should change the condition
// below back to the original one above. -Yoshito (2011-09-14)
if (!isStandard) {
tzID.setTo(bestMatchTzID);
timeType = bestMatchTimeType;
return bestMatchLen;
}
}
}
@ -1047,7 +1060,7 @@ TimeZoneGenericNames::findTimeZoneNames(const UnicodeString& text, int32_t start
nameTypes |= (UTZNM_LONG_GENERIC | UTZNM_LONG_STANDARD);
}
if (types & UTZGNM_SHORT) {
nameTypes |= (UTZNM_SHORT_GENERIC | UTZNM_SHORT_STANDARD_COMMONLY_USED);
nameTypes |= (UTZNM_SHORT_GENERIC | UTZNM_SHORT_STANDARD);
}
if (types) {

View File

@ -28,8 +28,6 @@ typedef enum UTimeZoneNameType {
UTZNM_SHORT_GENERIC = 0x08,
UTZNM_SHORT_STANDARD = 0x10,
UTZNM_SHORT_DAYLIGHT = 0x20,
UTZNM_SHORT_STANDARD_COMMONLY_USED = 0x40,
UTZNM_SHORT_DAYLIGHT_COMMONLY_USED = 0x80
} UTimeZoneNameType;
U_CDECL_END

View File

@ -39,7 +39,6 @@ static const char gMZPrefix[] = "meta:";
static const char* KEYS[] = {"lg", "ls", "ld", "sg", "ss", "sd"};
static const int32_t KEYS_SIZE = (sizeof KEYS / sizeof KEYS[0]);
static const char gCuTag[] = "cu";
static const char gEcTag[] = "ec";
static const char EMPTY[] = "<empty>"; // place holder for empty ZNames/TZNames
@ -47,7 +46,6 @@ static const char EMPTY[] = "<empty>"; // place holder for empty
static const UTimeZoneNameType ALL_NAME_TYPES[] = {
UTZNM_LONG_GENERIC, UTZNM_LONG_STANDARD, UTZNM_LONG_DAYLIGHT,
UTZNM_SHORT_GENERIC, UTZNM_SHORT_STANDARD, UTZNM_SHORT_DAYLIGHT,
UTZNM_SHORT_STANDARD_COMMONLY_USED, UTZNM_SHORT_DAYLIGHT_COMMONLY_USED,
UTZNM_UNKNOWN // unknown as the last one
};
@ -493,16 +491,15 @@ public:
const UChar* getName(UTimeZoneNameType type);
protected:
ZNames(const UChar** names, UBool shortCommonlyUsed);
static const UChar** loadData(UResourceBundle* rb, const char* key, UBool& shortCommonlyUsed);
ZNames(const UChar** names);
static const UChar** loadData(UResourceBundle* rb, const char* key);
private:
const UChar** fNames;
UBool fShortCommonlyUsed;
};
ZNames::ZNames(const UChar** names, UBool shortCommonlyUsed)
: fNames(names), fShortCommonlyUsed(shortCommonlyUsed) {
ZNames::ZNames(const UChar** names)
: fNames(names) {
}
ZNames::~ZNames() {
@ -513,13 +510,12 @@ ZNames::~ZNames() {
ZNames*
ZNames::createInstance(UResourceBundle* rb, const char* key) {
UBool shortCommonlyUsed = FALSE;
const UChar** names = loadData(rb, key, shortCommonlyUsed);
const UChar** names = loadData(rb, key);
if (names == NULL) {
// No names data available
return NULL;
}
return new ZNames(names, shortCommonlyUsed);
return new ZNames(names);
}
const UChar*
@ -539,9 +535,7 @@ ZNames::getName(UTimeZoneNameType type) {
name = fNames[2];
break;
case UTZNM_SHORT_GENERIC:
if (fShortCommonlyUsed) {
name = fNames[3];
}
name = fNames[3];
break;
case UTZNM_SHORT_STANDARD:
name = fNames[4];
@ -549,16 +543,6 @@ ZNames::getName(UTimeZoneNameType type) {
case UTZNM_SHORT_DAYLIGHT:
name = fNames[5];
break;
case UTZNM_SHORT_STANDARD_COMMONLY_USED:
if (fShortCommonlyUsed) {
name = fNames[4];
}
break;
case UTZNM_SHORT_DAYLIGHT_COMMONLY_USED:
if (fShortCommonlyUsed) {
name = fNames[5];
}
break;
default:
name = NULL;
}
@ -566,7 +550,7 @@ ZNames::getName(UTimeZoneNameType type) {
}
const UChar**
ZNames::loadData(UResourceBundle* rb, const char* key, UBool& shortCommonlyUsed) {
ZNames::loadData(UResourceBundle* rb, const char* key) {
if (rb == NULL || key == NULL || *key == 0) {
return NULL;
}
@ -597,16 +581,6 @@ ZNames::loadData(UResourceBundle* rb, const char* key, UBool& shortCommonlyUsed)
names = NULL;
}
}
if (names != NULL) {
status = U_ZERO_ERROR;
UResourceBundle* cuRes = ures_getByKeyWithFallback(rbTable, gCuTag, NULL, &status);
int32_t cu = ures_getInt(cuRes, &status);
if (U_SUCCESS(status)) {
shortCommonlyUsed = (cu != 0);
}
ures_close(cuRes);
}
}
ures_close(rbTable);
return names;
@ -623,12 +597,12 @@ public:
const UChar* getLocationName(void);
private:
TZNames(const UChar** names, UBool shortCommonlyUsed, const UChar* locationName);
TZNames(const UChar** names, const UChar* locationName);
const UChar* fLocationName;
};
TZNames::TZNames(const UChar** names, UBool shortCommonlyUsed, const UChar* locationName)
: ZNames(names, shortCommonlyUsed), fLocationName(locationName) {
TZNames::TZNames(const UChar** names, const UChar* locationName)
: ZNames(names), fLocationName(locationName) {
}
TZNames::~TZNames() {
@ -654,11 +628,10 @@ TZNames::createInstance(UResourceBundle* rb, const char* key) {
locationName = NULL;
}
UBool shortCommonlyUsed = FALSE;
const UChar** names = loadData(rb, key, shortCommonlyUsed);
const UChar** names = loadData(rb, key);
if (locationName != NULL || names != NULL) {
tznames = new TZNames(names, shortCommonlyUsed, locationName);
tznames = new TZNames(names, locationName);
}
}
ures_close(rbTable);

View File

@ -2350,29 +2350,29 @@ void DateFormatTest::TestTimeZoneDisplayName()
{ "en", "Australia/ACT", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
{ "en", "Australia/ACT", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+11:00", "+11:00" },
{ "en", "Australia/ACT", "2004-01-15T00:00:00Z", "z", "GMT+11:00", "+11:00" },
{ "en", "Australia/ACT", "2004-01-15T00:00:00Z", "z", "AEDT", "+11:00" },
{ "en", "Australia/ACT", "2004-01-15T00:00:00Z", "V", "AEDT", "+11:00" },
{ "en", "Australia/ACT", "2004-01-15T00:00:00Z", "zzzz", "Australian Eastern Daylight Time", "+11:00" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+10:00", "+10:00" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "z", "GMT+10:00", "+10:00" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "z", "AEST", "+10:00" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "V", "AEST", "+10:00" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "zzzz", "Australian Eastern Standard Time", "+10:00" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "v", "Australia Time (Sydney)", "Australia/Sydney" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "v", "AET", "Australia/Sydney" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "vvvv", "Eastern Australia Time", "Australia/Sydney" },
{ "en", "Australia/ACT", "2004-07-15T00:00:00Z", "VVVV", "Australia Time (Sydney)", "Australia/Sydney" },
{ "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "Z", "+1100", "+11:00" },
{ "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "ZZZZ", "GMT+11:00", "+11:00" },
{ "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "z", "GMT+11:00", "+11:00" },
{ "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "z", "AEDT", "+11:00" },
{ "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "V", "AEDT", "+11:00" },
{ "en", "Australia/Sydney", "2004-01-15T00:00:00Z", "zzzz", "Australian Eastern Daylight Time", "+11:00" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "Z", "+1000", "+10:00" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+10:00", "+10:00" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "z", "GMT+10:00", "+10:00" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "z", "AEST", "+10:00" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "V", "AEST", "+10:00" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "zzzz", "Australian Eastern Standard Time", "+10:00" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "v", "Australia Time (Sydney)", "Australia/Sydney" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "v", "AET", "Australia/Sydney" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "vvvv", "Eastern Australia Time", "Australia/Sydney" },
{ "en", "Australia/Sydney", "2004-07-15T00:00:00Z", "VVVV", "Australia Time (Sydney)", "Australia/Sydney" },
@ -2383,7 +2383,7 @@ void DateFormatTest::TestTimeZoneDisplayName()
{ "en", "Europe/London", "2004-01-15T00:00:00Z", "zzzz", "Greenwich Mean Time", "+0:00" },
{ "en", "Europe/London", "2004-07-15T00:00:00Z", "Z", "+0100", "+1:00" },
{ "en", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ", "GMT+01:00", "+1:00" },
{ "en", "Europe/London", "2004-07-15T00:00:00Z", "z", "GMT+01:00", "Europe/London" },
{ "en", "Europe/London", "2004-07-15T00:00:00Z", "z", "BST", "Europe/London" },
{ "en", "Europe/London", "2004-07-15T00:00:00Z", "V", "BST", "Europe/London" },
{ "en", "Europe/London", "2004-07-15T00:00:00Z", "zzzz", "British Summer Time", "Europe/London" },
// icu en.txt has exemplar city for this time zone
@ -2420,13 +2420,13 @@ void DateFormatTest::TestTimeZoneDisplayName()
{ "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
{ "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-08:00", "-8:00" },
{ "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-08:00", "-8:00" },
{ "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "PST", "-8:00" },
{ "de", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "Nordamerikanische Westk\\u00fcsten-Winterzeit", "-8:00" },
{ "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
{ "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-07:00", "-7:00" },
{ "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-07:00", "-7:00" },
{ "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "PDT", "-7:00" },
{ "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "Nordamerikanische Westk\\u00fcsten-Sommerzeit", "-7:00" },
{ "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "Vereinigte Staaten Zeit (Los Angeles)", "America/Los_Angeles" },
{ "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "PT", "America/Los_Angeles" },
{ "de", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "Nordamerikanische Westk\\u00fcstenzeit", "America/Los_Angeles" },
{ "de", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
@ -2525,14 +2525,14 @@ void DateFormatTest::TestTimeZoneDisplayName()
{ "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
{ "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "\\u683c\\u6797\\u5c3c\\u6cbb\\u6807\\u51c6\\u65f6\\u95f4-0800", "-8:00" },
{ "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "\\u683c\\u6797\\u5c3c\\u6cbb\\u6807\\u51c6\\u65f6\\u95f4-0800", "America/Los_Angeles" },
{ "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "PST", "America/Los_Angeles" },
{ "zh", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "\\u592a\\u5e73\\u6d0b\\u6807\\u51c6\\u65f6\\u95f4", "America/Los_Angeles" },
{ "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
{ "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "\\u683c\\u6797\\u5c3c\\u6cbb\\u6807\\u51c6\\u65f6\\u95f4-0700", "-7:00" },
{ "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "\\u683c\\u6797\\u5c3c\\u6cbb\\u6807\\u51c6\\u65f6\\u95f4-0700", "America/Los_Angeles" },
{ "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "PDT", "America/Los_Angeles" },
{ "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "\\u592a\\u5e73\\u6d0b\\u590f\\u4ee4\\u65f6\\u95f4", "America/Los_Angeles" },
// icu zh.txt has exemplar city for this time zone
{ "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "\\u7f8e\\u56fd\\u65F6\\u95F4\\uff08\\u6d1b\\u6749\\u77f6\\uff09", "America/Los_Angeles" },
{ "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "PT", "America/Los_Angeles" },
{ "zh", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u7f8e\\u56fd\\u592a\\u5e73\\u6d0b\\u65f6\\u95f4", "America/Los_Angeles" },
{ "zh", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
@ -2635,13 +2635,13 @@ void DateFormatTest::TestTimeZoneDisplayName()
{ "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
{ "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u096e:\\u0966\\u0966", "-8:00" },
{ "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-\\u0966\\u096e:\\u0966\\u0966", "-8:00" },
{ "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "PST", "-8:00" },
{ "hi", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "\\u092a\\u094d\\u0930\\u0936\\u093e\\u0902\\u0924\\u0020\\u092e\\u093e\\u0928\\u0915\\u0020\\u0938\\u092e\\u092f", "-8:00" },
{ "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
{ "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-\\u0966\\u096d:\\u0966\\u0966", "-7:00" },
{ "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-\\u0966\\u096d:\\u0966\\u0966", "-7:00" },
{ "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "PDT", "-7:00" },
{ "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "\\u092A\\u094D\\u0930\\u0936\\u093E\\u0902\\u0924 \\u0926\\u093F\\u0935\\u093E\\u0935\\u0932\\u094B\\u0915 \\u0938\\u092E\\u092F", "-7:00" },
{ "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "\\u0938\\u0902\\u092f\\u0941\\u0915\\u094d\\u0924 \\u0930\\u093e\\u091c\\u094d\\u092f \\u0905\\u092e\\u0947\\u0930\\u093f\\u0915\\u093e \\u0938\\u092E\\u092F (\\u0932\\u094b\\u0938 \\u090f\\u0902\\u091c\\u093f\\u0932\\u0947\\u0938)", "America/Los_Angeles" },
{ "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "PT", "America/Los_Angeles" },
{ "hi", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u092A\\u094D\\u0930\\u0936\\u093E\\u0902\\u0924 \\u0938\\u092E\\u092F", "America/Los_Angeles" },
{ "hi", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },
@ -2736,16 +2736,16 @@ void DateFormatTest::TestTimeZoneDisplayName()
{ "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
{ "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "\\u0413\\u0440\\u0438\\u0438\\u043D\\u0443\\u0438\\u0447-0800", "-8:00" },
{ "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "\\u0413\\u0440\\u0438\\u0438\\u043D\\u0443\\u0438\\u0447-0800", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "PST", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "V", "PST", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "\\u0422\\u0438\\u0445\\u043E\\u043E\\u043A\\u0435\\u0430\\u043D\\u0441\\u043A\\u0430 \\u0447\\u0430\\u0441\\u043E\\u0432\\u0430 \\u0437\\u043E\\u043D\\u0430", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "\\u0413\\u0440\\u0438\\u0438\\u043D\\u0443\\u0438\\u0447-0700", "-7:00" },
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "\\u0413\\u0440\\u0438\\u0438\\u043D\\u0443\\u0438\\u0447-0700", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "PDT", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "V", "PDT", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "\\u0422\\u0438\\u0445\\u043E\\u043E\\u043A\\u0435\\u0430\\u043D\\u0441\\u043A\\u0430 \\u043B\\u044F\\u0442\\u043D\\u0430 \\u0447\\u0430\\u0441\\u043E\\u0432\\u0430 \\u0437\\u043E\\u043D\\u0430", "America/Los_Angeles" },
// icu bg.txt has exemplar city for this time zone
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "\\u0421\\u0410\\u0429 \\u0432\\u0440\\u0435\\u043C\\u0435 (\\u041b\\u043e\\u0441 \\u0410\\u043d\\u0436\\u0435\\u043b\\u0438\\u0441)", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "PT", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u0422\\u0438\\u0445\\u043E\\u043E\\u043A\\u0435\\u0430\\u043D\\u0441\\u043A\\u043E \\u0432\\u0440\\u0435\\u043C\\u0435", "America/Los_Angeles" },
{ "bg", "America/Los_Angeles", "2004-07-15T00:00:00Z", "VVVV", "\\u0421\\u0410\\u0429 \\u0432\\u0440\\u0435\\u043C\\u0435 (\\u041b\\u043e\\u0441 \\u0410\\u043d\\u0436\\u0435\\u043b\\u0438\\u0441)", "America/Los_Angeles" },
@ -2807,7 +2807,7 @@ void DateFormatTest::TestTimeZoneDisplayName()
{ "bg", "Europe/London", "2004-01-15T00:00:00Z", "Z", "+0000", "+0:00" },
{ "bg", "Europe/London", "2004-01-15T00:00:00Z", "ZZZZ", "\\u0413\\u0440\\u0438\\u0438\\u043D\\u0443\\u0438\\u0447", "+0:00" },
{ "bg", "Europe/London", "2004-01-15T00:00:00Z", "z", "\\u0413\\u0440\\u0438\\u0438\\u043D\\u0443\\u0438\\u0447", "+0:00" },
{ "bg", "Europe/London", "2004-01-15T00:00:00Z", "z", "GMT", "+0:00" },
{ "bg", "Europe/London", "2004-01-15T00:00:00Z", "zzzz", "\\u0427\\u0430\\u0441\\u043E\\u0432\\u0430 \\u0437\\u043E\\u043D\\u0430 \\u0413\\u0440\\u0438\\u043D\\u0443\\u0438\\u0447", "+0:00" },
{ "bg", "Europe/London", "2004-07-15T00:00:00Z", "Z", "+0100", "+1:00" },
{ "bg", "Europe/London", "2004-07-15T00:00:00Z", "ZZZZ", "\\u0413\\u0440\\u0438\\u0438\\u043D\\u0443\\u0438\\u0447+0100", "+1:00" },
@ -2842,16 +2842,16 @@ void DateFormatTest::TestTimeZoneDisplayName()
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-08:00", "-8:00" },
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-08:00", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "PST", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "V", "PST", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "\\u30a2\\u30e1\\u30ea\\u30ab\\u592a\\u5e73\\u6d0b\\u6a19\\u6e96\\u6642", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-700" },
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-07:00", "-7:00" },
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-07:00", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "PDT", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "V", "PDT", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "\\u30a2\\u30e1\\u30ea\\u30ab\\u592a\\u5e73\\u6d0b\\u590f\\u6642\\u9593", "America/Los_Angeles" },
// icu ja.txt has exemplar city for this time zone
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "\\u30A2\\u30E1\\u30EA\\u30AB\\u5408\\u8846\\u56FD\\u6642\\u9593\\uFF08\\u30ed\\u30b5\\u30f3\\u30bc\\u30eb\\u30b9\\uFF09", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "PT", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "\\u30A2\\u30E1\\u30EA\\u30AB\\u592A\\u5e73\\u6D0B\\u6642\\u9593", "America/Los_Angeles" },
{ "ja", "America/Los_Angeles", "2004-07-15T00:00:00Z", "VVVV", "\\u30A2\\u30E1\\u30EA\\u30AB\\u5408\\u8846\\u56FD\\u6642\\u9593\\uFF08\\u30ed\\u30b5\\u30f3\\u30bc\\u30eb\\u30b9\\uFF09", "America/Los_Angeles" },
@ -2953,13 +2953,13 @@ void DateFormatTest::TestTimeZoneDisplayName()
{ "ti", "America/Los_Angeles", "2004-01-15T00:00:00Z", "Z", "-0800", "-8:00" },
{ "ti", "America/Los_Angeles", "2004-01-15T00:00:00Z", "ZZZZ", "GMT-08:00", "-8:00" },
{ "ti", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "GMT-08:00", "-8:00" },
{ "ti", "America/Los_Angeles", "2004-01-15T00:00:00Z", "z", "PST", "-8:00" },
{ "ti", "America/Los_Angeles", "2004-01-15T00:00:00Z", "zzzz", "GMT-08:00", "-8:00" },
{ "ti", "America/Los_Angeles", "2004-07-15T00:00:00Z", "Z", "-0700", "-7:00" },
{ "ti", "America/Los_Angeles", "2004-07-15T00:00:00Z", "ZZZZ", "GMT-07:00", "-7:00" },
{ "ti", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "GMT-07:00", "-7:00" },
{ "ti", "America/Los_Angeles", "2004-07-15T00:00:00Z", "z", "PDT", "-7:00" },
{ "ti", "America/Los_Angeles", "2004-07-15T00:00:00Z", "zzzz", "GMT-07:00", "-7:00" },
{ "ti", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "US (Los Angeles)", "America/Los_Angeles" },
{ "ti", "America/Los_Angeles", "2004-07-15T00:00:00Z", "v", "PT", "America/Los_Angeles" },
{ "ti", "America/Los_Angeles", "2004-07-15T00:00:00Z", "vvvv", "US (Los Angeles)", "America/Los_Angeles" },
{ "ti", "America/Argentina/Buenos_Aires", "2004-01-15T00:00:00Z", "Z", "-0300", "-3:00" },

View File

@ -765,7 +765,7 @@ void DateIntervalFormatTest::testFormat() {
"zh", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "MMMMy", "2007\\u5e7410\\u6708\\u81f311\\u6708",
"zh", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "hmv", "2007\\u5e7410\\u670810\\u65e5 \\u4e0a\\u534810:10 \\u7f8e\\u56fd\\u65F6\\u95F4\\uff08\\u6d1b\\u6749\\u77f6\\uff09\\u20132007\\u5e7411\\u670810\\u65e5 \\u4e0a\\u534810:10 \\u7f8e\\u56fd\\u65F6\\u95F4\\uff08\\u6d1b\\u6749\\u77f6\\uff09",
"zh", "2007 10 10 10:10:10", "2007 11 10 10:10:10", "hmv", "2007\\u5e7410\\u670810\\u65e5 \\u4e0a\\u534810:10 PT\\u20132007\\u5e7411\\u670810\\u65e5 \\u4e0a\\u534810:10 PT",
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "EEEEdMMMMy", "2007\\u5e7411\\u670810\\u65e5\\u661f\\u671f\\u516d\\u81f320\\u65e5\\u661f\\u671f\\u4e8c",
@ -794,7 +794,7 @@ void DateIntervalFormatTest::testFormat() {
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "MMM", "\\u5341\\u4E00\\u6708", // (fixed expected result per ticket:6626: and others)
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "hmz", "2007\\u5e7411\\u670810\\u65e5 \\u4e0a\\u534810:10 \\u683c\\u6797\\u5c3c\\u6cbb\\u6807\\u51c6\\u65f6\\u95f4-0800\\u20132007\\u5e7411\\u670820\\u65e5 \\u4e0a\\u534810:10 \\u683c\\u6797\\u5c3c\\u6cbb\\u6807\\u51c6\\u65f6\\u95f4-0800",
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "hmz", "2007\\u5e7411\\u670810\\u65e5 \\u4e0a\\u534810:10 PST\\u20132007\\u5e7411\\u670820\\u65e5 \\u4e0a\\u534810:10 PST",
"zh", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "h", "2007\\u5e7411\\u670810\\u65e5 \\u4e0a\\u534810\\u65f6\\u20132007\\u5e7411\\u670820\\u65e5 \\u4e0a\\u534810\\u65f6",
@ -803,17 +803,17 @@ void DateIntervalFormatTest::testFormat() {
"zh", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "hm", "\\u4e0a\\u534810:00\\u81f3\\u4e0b\\u53482:10",
"zh", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "hmz", "\\u683c\\u6797\\u5c3c\\u6cbb\\u6807\\u51c6\\u65f6\\u95f4-0800\\u4e0a\\u534810:00\\u81f3\\u4e0b\\u53482:10",
"zh", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "hmz", "PST\\u4e0a\\u534810:00\\u81f3\\u4e0b\\u53482:10",
"zh", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "h", "\\u4e0a\\u534810\\u81f3\\u4e0b\\u53482\\u65f6",
"zh", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "hv", "\\u7f8e\\u56fd\\u65F6\\u95F4\\uff08\\u6d1b\\u6749\\u77f6\\uff09\\u4e0a\\u534810\\u81f3\\u4e0b\\u53482\\u65f6",
"zh", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "hv", "PT\\u4e0a\\u534810\\u81f3\\u4e0b\\u53482\\u65f6",
"zh", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hm", "\\u4e0a\\u534810:00\\u81f310:20",
"zh", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hmv", "\\u7f8e\\u56fd\\u65F6\\u95F4\\uff08\\u6d1b\\u6749\\u77f6\\uff09\\u4e0a\\u534810:00\\u81f310:20",
"zh", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hmv", "PT\\u4e0a\\u534810:00\\u81f310:20",
"zh", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hz", "\\u4e0a\\u534810\\u65f6 \\u683c\\u6797\\u5c3c\\u6cbb\\u6807\\u51c6\\u65f6\\u95f4-0800",
"zh", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hz", "\\u4e0a\\u534810\\u65f6 PST",
"zh", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "hm", "\\u4e0a\\u534810:10",
@ -893,7 +893,7 @@ void DateIntervalFormatTest::testFormat() {
"de", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "y", "2007",
"de", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "hmv", "10.11.2007 10:10 vorm. Vereinigte Staaten Zeit (Los Angeles) - 20.11.2007 10:10 vorm. Vereinigte Staaten Zeit (Los Angeles)",
"de", "2007 11 10 10:10:10", "2007 11 20 10:10:10", "hmv", "10.11.2007 10:10 vorm. PT - 20.11.2007 10:10 vorm. PT",
"de", "2007 01 10 10:00:10", "2007 01 10 14:10:10", "EEEEdMMMy", "Mittwoch, 10. Jan 2007",
@ -911,27 +911,27 @@ void DateIntervalFormatTest::testFormat() {
"de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "EEEEdMMM", "Mittwoch, 10. Jan",
"de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hmv", "10:00-10:20 vorm. Vereinigte Staaten Zeit (Los Angeles)",
"de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hmv", "10:00-10:20 vorm. PT",
"de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hmz", "10:00-10:20 vorm. GMT-08:00",
"de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hmz", "10:00-10:20 vorm. PST",
"de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "h", "10 vorm.",
"de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "H", "10 Uhr",
"de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hz", "10 vorm. GMT-08:00",
"de", "2007 01 10 10:00:10", "2007 01 10 10:20:10", "hz", "10 vorm. PST",
"de", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "EEEEdMMMy", "Mittwoch, 10. Jan 2007",
"de", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "hmv", "10:10 vorm. Vereinigte Staaten Zeit (Los Angeles)",
"de", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "hmv", "10:10 vorm. PT",
"de", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "hmz", "10:10 vorm. GMT-08:00",
"de", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "hmz", "10:10 vorm. PST",
"de", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "hv", "10 vorm. Vereinigte Staaten Zeit (Los Angeles)",
"de", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "hv", "10 vorm. PT",
"de", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "hz", "10 vorm. GMT-08:00",
"de", "2007 01 10 10:10:10", "2007 01 10 10:10:20", "hz", "10 vorm. PST",
// Thai (default calendar buddhist)