com.ibm.icu.text
public class ChineseDateFormat extends SimpleDateFormat
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. {@link SimpleDateFormat}:
Symbol Meaning Presentation Example ------ ------- ------------ ------- G cycle (Number) 78 y year of cycle (1..60) (Number) 17 l is leap month (Text) 4637
See Also: ChineseCalendar ChineseDateFormatSymbols
UNKNOWN: ICU 2.0
Constructor Summary | |
---|---|
ChineseDateFormat(String pattern, Locale locale)
Construct a ChineseDateFormat from a date format pattern and locale | |
ChineseDateFormat(String pattern, ULocale locale)
Construct a ChineseDateFormat from a date format pattern and locale |
Method Summary | |
---|---|
protected void | subFormat(StringBuffer buf, char ch, int count, int beginOffset, FieldPosition pos, Calendar cal) |
protected int | subParse(String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal) |
Parameters: pattern the pattern locale the locale
UNKNOWN: ICU 2.0
Parameters: pattern the pattern locale the locale
UNKNOWN: ICU 3.2 This API might change or be removed in a future release.
Deprecated: This API is ICU internal only.
UNKNOWN:
UNKNOWN: ICU 2.0