@Deprecated public abstract class DurationFormat extends UFormat
Use MeasureFormat to format periods like "5 days, 3 hours"; use RelativeDateTimeFormatter to format relative dates like "5 days ago".
MeasureFormat
,
RelativeDateTimeFormatter
,
Serialized FormUFormat.SpanField
Format.Field
Modifier | Constructor and Description |
---|---|
protected |
DurationFormat()
Deprecated.
This API is ICU internal only.
|
protected |
DurationFormat(ULocale locale)
Deprecated.
This API is ICU internal only.
|
Modifier and Type | Method and Description |
---|---|
abstract StringBuffer |
format(Object object,
StringBuffer toAppend,
FieldPosition pos)
Deprecated.
ICU 56
|
abstract String |
formatDurationFrom(long duration,
long referenceDate)
Deprecated.
ICU 56
|
abstract String |
formatDurationFromNow(long duration)
Deprecated.
ICU 56
|
abstract String |
formatDurationFromNowTo(Date targetDate)
Deprecated.
ICU 56
|
static DurationFormat |
getInstance(ULocale locale)
Deprecated.
ICU 56
|
Object |
parseObject(String source,
ParsePosition pos)
Deprecated.
ICU 56
|
clone, format, formatToCharacterIterator, parseObject
@Deprecated protected DurationFormat()
@Deprecated protected DurationFormat(ULocale locale)
@Deprecated public static DurationFormat getInstance(ULocale locale)
@Deprecated public abstract StringBuffer format(Object object, StringBuffer toAppend, FieldPosition pos)
@Deprecated public Object parseObject(String source, ParsePosition pos)