| Modifier and Type | Class and Description |
|---|---|
| private class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private transient BreakIterator | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private MessageFormat | |
| private DateFormat | |
| private String | |
| private transient List | |
| pack-priv int | |
| private SimpleDateFormat | |
| pack-priv ULocale | |
| private DateFormat | |
| private String | |
| pack-priv int | |
| private static final long | serialVersionUID
serial version (generated)
|
| Access | Constructor and Description |
|---|---|
| public | RelativeDateFormat(int
The time style for the date and time. timeStyle, int The date style for the date and time. dateStyle, ULocale The locale for the date. locale, Calendar The calendar to be used cal)
|
| Modifier and Type | Method and Description |
|---|---|
| private static int | |
| public StringBuffer | format(Calendar
a Calendar set to the date and time to be formatted
into a date/time string. When the calendar type is different from
the internal calendar held by this DateFormat instance, the date
and the time zone will be inherited from the input calendar, but
other calendar field values will be calculated by the internal calendar. cal, StringBuffer the string buffer for the returning date/time string. toAppendTo, FieldPosition keeps track of the position of the field
within the returned string.
On input: an alignment field,
if desired. On output: the offsets of the alignment field. For
example, given a time text "1996.07.10 AD at 15:08:56 PDT",
if the given fieldPosition is DateFormat.YEAR_FIELD, the
begin index and end index of fieldPosition will be set to
0 and 4, respectively.
Notice that if the same time field appears
more than once in a pattern, the fieldPosition will be set for the first
occurrence of that time field. For instance, formatting a Date to
the time string "1 PM PDT (Pacific Daylight Time)" using the pattern
"h a z (zzzz)" and the alignment field DateFormat.TIMEZONE_FIELD,
the begin index and end index of fieldPosition will be set to
5 and 8, respectively, for the first occurrence of the timezone
pattern character 'z'. fieldPosition)Implements abstract com. |
| private String | Returns: the string, or NULL if none at that location.day offset ( -1, 0, 1, etc.. ). Does not require sorting by offset. day)Get the string at a specific offset. |
| private void | initCapitalizationContextInfo(ULocale locale)
Set capitalizationOfRelativeUnitsForListOrMenu, capitalizationOfRelativeUnitsForStandAlone |
| private Calendar | Returns: the newly constructed fCalendarZone to be adopted, or NULL for TimeZone::createDefault(). zone, ULocale Locale of the calendar locale)initializes fCalendar from parameters. |
| private MessageFormat | |
| private synchronized void | |
| public void | parse(String
The date/time string to be parsed text, Calendar The calendar set on input to the date and time to be used
for missing values in the date/time string being parsed,
and set on output to the parsed date/time. In general, this
should be initialized before calling this method - either
cleared or set to the current date, depending on desired
behavior. If this parse fails, the calendar may still
have been modified. When the calendar type is different
from the internal calendar held by this DateFormat
instance, calendar field values will be parsed based
on the internal calendar initialized with the time and
the time zone taken from this calendar, then the
parse result (time in milliseconds and time zone) will
be set back to this calendar. cal, ParsePosition On input, the position at which to start parsing; on
output, the position at which parsing terminated, or the
start position if the parse failed. pos)Implements abstract com. |
| public void | setContext(DisplayContext
The DisplayContext value to set. context)Overrides com. ICU |
| capitalizationBrkIter | back to summary |
|---|---|
| private transient BreakIterator capitalizationBrkIter | |
| capitalizationInfoIsSet | back to summary |
|---|---|
| private boolean capitalizationInfoIsSet | |
| capitalizationOfRelativeUnitsForListOrMenu | back to summary |
|---|---|
| private boolean capitalizationOfRelativeUnitsForListOrMenu | |
| capitalizationOfRelativeUnitsForStandAlone | back to summary |
|---|---|
| private boolean capitalizationOfRelativeUnitsForStandAlone | |
| combinedFormatHasDateAtStart | back to summary |
|---|---|
| private boolean combinedFormatHasDateAtStart | |
| fCombinedFormat | back to summary |
|---|---|
| private MessageFormat fCombinedFormat | |
| fDateFormat | back to summary |
|---|---|
| private DateFormat fDateFormat | |
| fDatePattern | back to summary |
|---|---|
| private String fDatePattern | |
| fDates | back to summary |
|---|---|
| private transient List<RelativeDateFormat. | |
| fDateStyle | back to summary |
|---|---|
| pack-priv int fDateStyle | |
| fDateTimeFormat | back to summary |
|---|---|
| private SimpleDateFormat fDateTimeFormat | |
| fLocale | back to summary |
|---|---|
| pack-priv ULocale fLocale | |
| fTimeFormat | back to summary |
|---|---|
private DateFormat fTimeFormat
| |
| fTimePattern | back to summary |
|---|---|
| private String fTimePattern | |
| fTimeStyle | back to summary |
|---|---|
| pack-priv int fTimeStyle | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. serial version (generated) | |
| RelativeDateFormat | back to summary |
|---|---|
| public RelativeDateFormat(int timeStyle, int dateStyle, ULocale locale, Calendar cal) | |
| dayDifference | back to summary |
|---|---|
private static int dayDifference(Calendar until)
| |
| format | back to summary |
|---|---|
| public StringBuffer format(Calendar cal, StringBuffer toAppendTo, FieldPosition fieldPosition) Implements abstract com. Doc from com. Formats a date into a date/time string.
| |
| getStringForDay | back to summary |
|---|---|
| private String getStringForDay(int day) Get the string at a specific offset.
| |
| initCapitalizationContextInfo | back to summary |
|---|---|
| private void initCapitalizationContextInfo(ULocale locale) Set capitalizationOfRelativeUnitsForListOrMenu, capitalizationOfRelativeUnitsForStandAlone | |
| initializeCalendar | back to summary |
|---|---|
| private Calendar initializeCalendar(TimeZone zone, ULocale locale) initializes fCalendar from parameters. Returns fCalendar as a convenience. | |
| initializeCombinedFormat | back to summary |
|---|---|
| private MessageFormat initializeCombinedFormat(Calendar cal, ULocale locale) | |
| loadDates | back to summary |
|---|---|
| private synchronized void loadDates() Load the Date string array | |
| parse | back to summary |
|---|---|
| public void parse(String text, Calendar cal, ParsePosition pos) Implements abstract com. Doc from com. Parses a date/time string according to the given parse position. For example, a time text "07/10/96 4:5 PM, PDT" will be parsed into a Calendar that is equivalent to Date(837039928046). Before calling this method the caller should initialize the calendar in one of two ways (unless existing field information is to be kept): (1) clear the calendar, or (2) set the calendar to the current date (or to any date whose fields should be used to supply values that are missing in the parsed date). For example, Chinese calendar dates do not normally provide an era/cycle; in this case the calendar that is passed in should be set to a date within the era that should be assumed, normally the current era. By default, parsing is lenient: If the input is not in the form used by this object's format method but can still be parsed as a date, then the parse succeeds. Clients may insist on strict adherence to the format by calling setLenient(false).
| |
| setContext | back to summary |
|---|---|
| public void setContext(DisplayContext context) Overrides com. Doc from com. ICU
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | put(UResource.
Initially the key string of the enumeration-start resource.
Empty if the enumeration starts at the top level of the bundle.
Reuse for output values from Array and Table getters. key,Call getArray() or getTable() as appropriate.
Then reuse for output values from Array and Table getters. value,true if the bundle has no parent;
that is, its top-level table has the nofallback attribute,
or it is the root bundle of a locale tree. noFallback)Implements abstract com. |
| RelDateFmtDataSink | back to summary |
|---|---|
| private RelDateFmtDataSink() | |
| put | back to summary |
|---|---|
| public void put(UResource. Implements abstract com. Doc from com. Called once for each bundle (child-parent-...-root). The value is normally an array or table resource, and implementations of this method normally iterate over the tree of resource items stored there.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| URelativeString | back to summary |
|---|---|
| pack-priv URelativeString(int offset, String string) | |
| URelativeString | back to summary |
|---|---|
| pack-priv URelativeString(String offset, String string) | |