Deprecated
as a consequence of DurationFormat being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv transient DurationFormatter | |
| pack-priv transient PeriodFormatter | |
| pack-priv transient PeriodFormatterService | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public StringBuffer | format(Object
the object to format. Should be either a Long, Date, or javax.xml.datatype.Duration object. object, StringBuffer the buffer to append to toAppend, FieldPosition the field position, may contain additional error messages. pos)Implements abstract com. |
| public String | Returns: The PeriodFormatter object formatted to the object passed.Object being passed. obj)JDK 1.5+ only |
| public String | formatDurationFrom(long
the duration in milliseconds duration, long the date from which to compute the duration referenceDate)Implements abstract com. |
| public String | formatDurationFromNow(long
the duration in milliseconds duration)Implements abstract com. |
| public String | formatDurationFromNowTo(Date
the ending date targetDate)Implements abstract com. |
| public static BasicDurationFormat | getInstance(ULocale locale)
Hides com.
Deprecated
as a consequence of
Construct a duration format for the specified locale
BasicDurationFormat being deprecated.
|
| formatter | back to summary |
|---|---|
| pack-priv transient DurationFormatter formatter | |
| pformatter | back to summary |
|---|---|
| pack-priv transient PeriodFormatter pformatter | |
| pfs | back to summary |
|---|---|
| pack-priv transient PeriodFormatterService pfs | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| BasicDurationFormat | back to summary |
|---|---|
| public BasicDurationFormat() | |
| BasicDurationFormat | back to summary |
|---|---|
| public BasicDurationFormat(ULocale locale) | |
| format | back to summary |
|---|---|
| public StringBuffer format(Object object, StringBuffer toAppend, FieldPosition pos) Implements abstract com. Doc from com. Format an arbitrary object. Defaults to a call to formatDurationFromNow() for either Long or Date objects.
| |
| formatDuration | back to summary |
|---|---|
| public String formatDuration(Object obj) JDK 1.5+ only | |
| formatDurationFrom | back to summary |
|---|---|
| public String formatDurationFrom(long duration, long referenceDate) Implements abstract com. Doc from com. Formats a duration expressed in milliseconds from a reference date. The reference date allows formatters to use actual durations of variable-length periods (like months) if they wish. The duration is expressed as the number of milliseconds in the past (negative values) or future (positive values) with respect to a reference date (expressed as milliseconds in epoch).
| |
| formatDurationFromNow | back to summary |
|---|---|
| public String formatDurationFromNow(long duration) Implements abstract com. Doc from com. Formats a duration expressed in milliseconds. This is a convenience method that calls formatDurationFrom using the current system time as the reference date.
| |
| formatDurationFromNowTo | back to summary |
|---|---|
| public String formatDurationFromNowTo(Date targetDate) Implements abstract com. Doc from com. Formats the duration between now and a target date.
This is a convenience method that calls
formatDurationFrom(long, long) using now
as the reference date, and the difference between now and
| |
| getInstance | back to summary |
|---|---|
| public static BasicDurationFormat getInstance(ULocale locale) Hides com. Doc from com. Deprecated as a consequence of Construct a duration format for the specified locale | |