Deprecated
ICU 50 Use SimpleDateFormat instead.
DateFormat for com.ibm.icu.util.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
com.ibm.icu.util.ChineseCalendar , ChineseDateFormatSymbols
| Modifier and Type | Class and Description |
|---|---|
| public static class | ChineseDateFormat.Field
Deprecated
ICU 50
The instances of this inner class are used as attribute keys and values
in AttributedCharacterIterator that
ChineseDateFormat.formatToCharacterIterator() method returns.
|
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public | ChineseDateFormat(String
the pattern pattern, Locale the locale locale)
Deprecated
ICU 50
Construct a ChineseDateFormat from a date format pattern and locale
|
| public | ChineseDateFormat(String
the pattern pattern, ULocale the locale locale)
Deprecated
ICU 50
Construct a ChineseDateFormat from a date format pattern and locale
|
| public | ChineseDateFormat(String
the pattern pattern, String The override string. A numbering system override string can take one of the following forms:
1). If just a numbering system name is specified, it applies to all numeric fields in the date format pattern.
2). To specify an alternate numbering system on a field by field basis, use the field letters from the pattern
followed by an = sign, followed by the numbering system name. For example, to specify that just the year
be formatted using Hebrew digits, use the override "y=hebr". Multiple overrides can be specified in a single
string by separating them with a semi-colon. For example, the override string "m=thai;y=deva" would format using
Thai digits for the month and Devanagari digits for the year. override, ULocale the locale locale)
Deprecated
ICU 50
Construct a ChineseDateFormat from a date format pattern, numbering system override and locale
|
| Modifier and Type | Method and Description |
|---|---|
| protected DateFormat. | patternCharToDateFormatField(char
The pattern character ch)Overrides com.
Deprecated
ICU 50
Returns a DateFormat.Field constant associated with the specified format pattern
character.
|
| protected void | subFormat(StringBuffer buf, char ch, int count, int beginOffset, int fieldNum, DisplayContext capitalizationContext, FieldPosition pos, char patternCharToOutput, Calendar cal)
Overrides com.
Deprecated
This API is ICU internal only.
Formats a single field; useFastFormat variant.
|
| protected int | subParse(String
the time text to be parsed. text, int where to start parsing. start, char the pattern character for the date field text to be parsed. ch, int the count of a pattern character. count, boolean if true, then the next field directly abuts this one,
and we should use the count to know when to stop parsing. obeyCount, boolean allowNegative, boolean[] return parameter; upon return, if ambiguousYear[0]
is true, then a two-digit year was parsed and may need to be readjusted. ambiguousYear, Calendar cal)Overrides com.
Deprecated
ICU 50
Protected method that converts one field of the input string into a
numeric field value in cal.
|
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| ChineseDateFormat | back to summary |
|---|---|
| public ChineseDateFormat(String pattern, Locale locale)
Deprecated ICU 50 Construct a ChineseDateFormat from a date format pattern and locale
| |
| ChineseDateFormat | back to summary |
|---|---|
| public ChineseDateFormat(String pattern, ULocale locale)
Deprecated ICU 50 Construct a ChineseDateFormat from a date format pattern and locale
| |
| ChineseDateFormat | back to summary |
|---|---|
| public ChineseDateFormat(String pattern, String override, ULocale locale)
Deprecated ICU 50 Construct a ChineseDateFormat from a date format pattern, numbering system override and locale
| |
| patternCharToDateFormatField | back to summary |
|---|---|
| protected DateFormat. Overrides com. Doc from com. Deprecated ICU 50 Returns a DateFormat.Field constant associated with the specified format pattern character.
| |
| subFormat | back to summary |
|---|---|
| protected void subFormat(StringBuffer buf, char ch, int count, int beginOffset, int fieldNum, DisplayContext capitalizationContext, FieldPosition pos, char patternCharToOutput, Calendar cal) Overrides com. Doc from com. Deprecated This API is ICU internal only. Formats a single field; useFastFormat variant. Reuses a StringBuffer for results instead of creating a String on the heap for each call. NOTE We don't really need the beginOffset parameter, EXCEPT for the need to support the slow subFormat variant (above) which has to pass it in to us.
| |
| subParse | back to summary |
|---|---|
| protected int subParse(String text, int start, char ch, int count, boolean obeyCount, boolean allowNegative, boolean[] ambiguousYear, Calendar cal) Overrides com. Doc from com. Deprecated ICU 50 Protected method that converts one field of the input string into a
numeric field value in
| |
Deprecated
ICU 50
There is no public constructor to this class, the only instances are the constants defined here.
| Modifier and Type | Field and Description |
|---|---|
| public static final ChineseDateFormat. | IS_LEAP_MONTH
Constant identifying the leap month marker. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static DateFormat. | Returns: Field associated with the calendarField,
or null if no associated Field is available.ChineseCalendar field constantHides com.
Deprecated
ICU 50
Returns the Field constant that corresponds to the
ChineseCalendar field calendarField.
|
| protected Object | readResolve()
Overrides com.
Deprecated
ICU 50
Resolves instances being deserialized to the predefined constants.
|
| IS_LEAP_MONTH | back to summary |
|---|---|
| public static final ChineseDateFormat. Deprecated ICU 50 This field is only used by the deprecated ChineseDateFormat class. Constant identifying the leap month marker. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| Field | back to summary |
|---|---|
| protected Field(String name, int calendarField)
Deprecated ICU 50 Constructs a
| |
| ofCalendarField | back to summary |
|---|---|
| public static DateFormat. Hides com. Deprecated ICU 50 Returns the
| |
| readResolve | back to summary |
|---|---|
| protected Object readResolve() throws InvalidObjectException Overrides com. Doc from com. Deprecated ICU 50 Resolves instances being deserialized to the predefined constants.
| |