org.apache.log4j.helpers

Class ISO8601DateFormat


public class ISO8601DateFormat
extends AbsoluteTimeDateFormat

Formats a Date in the format "YYYY-mm-dd HH:mm:ss,SSS" for example "1999-11-27 15:49:37,459".

Refer to the summary of the International Standard Date and Time Notation for more information on this format.

Authors:
Ceki Gülcü
Andrew Vajoczki
Since:
0.7.5

Field Summary

Fields inherited from class org.apache.log4j.helpers.AbsoluteTimeDateFormat

ABS_TIME_DATE_FORMAT, DATE_AND_TIME_DATE_FORMAT, ISO8601_DATE_FORMAT

Constructor Summary

ISO8601DateFormat()
ISO8601DateFormat(TimeZone timeZone)

Method Summary

StringBuffer
format(Date date, StringBuffer sbuf, FieldPosition fieldPosition)
Appends a date in the format "YYYY-mm-dd HH:mm:ss,SSS" to sbuf.
Date
parse(String s, ParsePosition pos)
This method does not do anything but return null.

Methods inherited from class org.apache.log4j.helpers.AbsoluteTimeDateFormat

format, parse

Constructor Details

ISO8601DateFormat

public ISO8601DateFormat()

ISO8601DateFormat

public ISO8601DateFormat(TimeZone timeZone)

Method Details

format

public StringBuffer format(Date date,
                           StringBuffer sbuf,
                           FieldPosition fieldPosition)
Appends a date in the format "YYYY-mm-dd HH:mm:ss,SSS" to sbuf. For example: "1999-11-27 15:49:37,459".
Overrides:
format in interface AbsoluteTimeDateFormat
Parameters:
sbuf - the StringBuffer to write to

parse

public Date parse(String s,
                  ParsePosition pos)
This method does not do anything but return null.

Copyright 2000-2005 Apache Software Foundation.