FileDocCategorySizeDatePackage
RelativeTimeDateFormat.javaAPI DocApache log4j 1.2.151988Sat Aug 25 00:09:40 BST 2007org.apache.log4j.helpers

RelativeTimeDateFormat

public class RelativeTimeDateFormat extends DateFormat
Formats a {@link Date} by printing the number of milliseconds elapsed since construction of the format. This is the fastest printing DateFormat in the package.
author
Ceki Gülcü
since
0.7.5

Fields Summary
private static final long
serialVersionUID
protected final long
startTime
Constructors Summary
public RelativeTimeDateFormat()


  
   
    this.startTime = System.currentTimeMillis();
  
Methods Summary
public java.lang.StringBufferformat(java.util.Date date, java.lang.StringBuffer sbuf, java.text.FieldPosition fieldPosition)
Appends to sbuf the number of milliseconds elapsed since the start of the application.

since
0.7.5

    //System.err.println(":"+ date.getTime() + " - " + startTime);
    return sbuf.append((date.getTime() - startTime));
  
public java.util.Dateparse(java.lang.String s, java.text.ParsePosition pos)
This method does not do anything but return null.

    return null;