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

Constructor Index

 o IntervalDescribingDateFormat()

Method Index

 o format(Date, StringBuffer, FieldPosition)
 o 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.
 o parse(String, ParsePosition)
don't intend to implement this (yet)

Constructors

 o IntervalDescribingDateFormat
 public IntervalDescribingDateFormat()

Methods

 o 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.

 o format
 public StringBuffer format(Date date,
                            StringBuffer toAppendTo,
                            FieldPosition fp)
Overrides:
format in class DateFormat
 o 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