mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-5241 Add getQuarters / setQuarters, and tests.
X-SVN-Rev: 20047
This commit is contained in:
parent
efe6f405a4
commit
35bff7f791
1 changed files with 7 additions and 4 deletions
|
@ -696,8 +696,8 @@ public class SimpleDateFormat extends DateFormat {
|
|||
/*v*/ DateFormat.TIMEZONE_GENERIC_FIELD,
|
||||
/*c*/ DateFormat.STANDALONE_DAY_FIELD,
|
||||
/*L*/ DateFormat.STANDALONE_MONTH_FIELD,
|
||||
/*Q*/ DateFormat.MONTH_FIELD,
|
||||
/*q*/ DateFormat.STANDALONE_MONTH_FIELD,
|
||||
/*Q*/ DateFormat.QUARTER_FIELD,
|
||||
/*q*/ DateFormat.STANDALONE_QUARTER_FIELD,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -873,11 +873,13 @@ public class SimpleDateFormat extends DateFormat {
|
|||
res = ZoneMeta.displayFallback(zid, city, locale);
|
||||
*/
|
||||
res = formatData.getZoneString(zid, DateFormatSymbols.TIMEZONE_EXEMPLAR_CITY);
|
||||
if(res==null){
|
||||
|
||||
if (res == null) {
|
||||
res = ZoneMeta.displayFallback(zid, null, locale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(res.length()==0){
|
||||
appendGMT(buf, cal);
|
||||
}else{
|
||||
|
@ -1438,10 +1440,11 @@ public class SimpleDateFormat extends DateFormat {
|
|||
value = item.value;
|
||||
type = item.type;
|
||||
}
|
||||
|
||||
if (zid != null) {
|
||||
tz = TimeZone.getTimeZone(zid);
|
||||
}
|
||||
|
||||
|
||||
if (tz != null) { // Matched any ?
|
||||
// always set zone offset, needed to get correct hour in wall time
|
||||
// when checking daylight savings
|
||||
|
|
Loading…
Add table
Reference in a new issue