All Packages Class Hierarchy This Package Previous Next Index
Class benno.util.IntervalDescribingDateFormat
java.lang.Object
|
+----java.text.Format
|
+----java.text.DateFormat
|
+----benno.util.IntervalDescribingDateFormat
- public class IntervalDescribingDateFormat
- extends DateFormat
Formats a time interval into an English string. The format method
may be passed either a Date or a number of milliseconds. Example
output is:
3 secs
or 4 days
.
- Version:
- $Revision: 1.3 $
- Author:
- Ben Clifford
-
IntervalDescribingDateFormat()
-
-
format(Date, StringBuffer, FieldPosition)
-
-
format(long)
- really should do this the other way round - pull the ms out of the
date object if we are given a date, or work natively on ms.
-
parse(String, ParsePosition)
- don't intend to implement this (yet)
IntervalDescribingDateFormat
public IntervalDescribingDateFormat()
format
public String format(long ms)
- really should do this the other way round - pull the ms out of the
date object if we are given a date, or work natively on ms. But the
important thing is to provide both in the API, which this does.
format
public StringBuffer format(Date date,
StringBuffer toAppendTo,
FieldPosition fp)
- Overrides:
- format in class DateFormat
parse
public Date parse(String text,
ParsePosition pp)
- don't intend to implement this (yet)
- Overrides:
- parse in class DateFormat
All Packages Class Hierarchy This Package Previous Next Index