| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
Formatcom.ibm.icu.text.UFormatcom.ibm.icu.text.DateFormatcom.ibm.icu.text.SimpleDateFormatcom.ibm.icu.text.ChineseDateFormatpublic class ChineseDateFormatextends SimpleDateFormatDateFormat for ChineseCalendar.
This class handles a ChineseCalendar-specific field,
ChineseCalendar.IS_LEAP_MONTH. It also redefines the
handling of two fields, ERA and YEAR. The
former is displayed numerically, instead of symbolically, since it is
the numeric cycle number in ChineseCalendar. The latter is
numeric, as before, but has no special 2-digit Y2K behavior.
With regard to ChineseCalendar.IS_LEAP_MONTH, this
class handles parsing specially. If no string symbol is found at all,
this is taken as equivalent to an IS_LEAP_MONTH value of
zero. This allows formats to display a special string (e.g., "*") for
leap months, but no string for normal months.
Summary of field changes vs. SimpleDateFormat:Symbol Meaning Presentation Example ------ ------- ------------ ------- G cycle (Number) 78 y year of cycle (1..60) (Number) 17 l is leap month (Text) 4637
ChineseCalendar, ChineseDateFormatSymbolsField Summary |
Constructor Summary | |
| |
| |
Method Summary | |
protected void | |
protected int | |
Methods inherited from class com.ibm.icu.text.SimpleDateFormat | |
applyLocalizedPattern, applyPattern, clone, equals, format, get2DigitYearStart, getDateFormatSymbols, getSymbols, hashCode, matchString, parse, set2DigitYearStart, setDateFormatSymbols, setNumberFormat, subFormat, subFormat, subParse, toLocalizedPattern, toPattern, zeroPaddingNumber, zeroPaddingNumber | |
public ChineseDateFormat(String pattern,
Locale locale)Construct a ChineseDateFormat from a date format pattern and locale
- Parameters:
pattern- the patternlocale- the locale
public ChineseDateFormat(String pattern,
ULocale locale)Construct a ChineseDateFormat from a date format pattern and locale
- Parameters:
pattern- the patternlocale- the locale
protected void subFormat(StringBuffer buf,
char ch,
int count,
int beginOffset,
FieldPosition pos,
Calendar cal)
- Overrides:
- subFormat in interface SimpleDateFormat
protected int subParse(String text,
int start,
char ch,
int count,
boolean obeyCount,
boolean allowNegative,
boolean[] ambiguousYear,
Calendar cal)
- Overrides:
- subParse in interface SimpleDateFormat