public class

DateFormatManager

extends Object
java.lang.Object
   ↳ org.apache.log4j.lf5.util.DateFormatManager

Class Overview

Date format manager. Utility class to help manage consistent date formatting and parsing. It may be advantageous to have multiple DateFormatManagers per application. For example, one for handling the output (formatting) of dates, and another one for handling the input (parsing) of dates.

Summary

Public Constructors
DateFormatManager()
DateFormatManager(TimeZone timeZone)
DateFormatManager(Locale locale)
DateFormatManager(String pattern)
DateFormatManager(TimeZone timeZone, Locale locale)
DateFormatManager(TimeZone timeZone, String pattern)
DateFormatManager(Locale locale, String pattern)
DateFormatManager(TimeZone timeZone, Locale locale, String pattern)
Public Methods
String format(Date date)
String format(Date date, String pattern)
synchronized DateFormat getDateFormatInstance()
synchronized Locale getLocale()
synchronized String getOutputFormat()
This method is deprecated. Use getPattern().
synchronized String getPattern()
synchronized TimeZone getTimeZone()
Date parse(String date)
Date parse(String date, String pattern)
synchronized void setDateFormatInstance(DateFormat dateFormat)
synchronized void setLocale(Locale locale)
synchronized void setOutputFormat(String pattern)
This method is deprecated. Use setPattern().
synchronized void setPattern(String pattern)
Set the pattern.
synchronized void setTimeZone(TimeZone timeZone)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DateFormatManager ()

public DateFormatManager (TimeZone timeZone)

public DateFormatManager (Locale locale)

public DateFormatManager (String pattern)

public DateFormatManager (TimeZone timeZone, Locale locale)

public DateFormatManager (TimeZone timeZone, String pattern)

public DateFormatManager (Locale locale, String pattern)

public DateFormatManager (TimeZone timeZone, Locale locale, String pattern)

Public Methods

public String format (Date date)

public String format (Date date, String pattern)

public synchronized DateFormat getDateFormatInstance ()

public synchronized Locale getLocale ()

public synchronized String getOutputFormat ()

This method is deprecated.
Use getPattern().

This method has been deprecated in favour of getPattern().

public synchronized String getPattern ()

public synchronized TimeZone getTimeZone ()

public Date parse (String date)

Throws
ParseException

public Date parse (String date, String pattern)

Throws
ParseException

public synchronized void setDateFormatInstance (DateFormat dateFormat)

public synchronized void setLocale (Locale locale)

public synchronized void setOutputFormat (String pattern)

This method is deprecated.
Use setPattern().

This method has been deprecated in favour of setPattern().

public synchronized void setPattern (String pattern)

Set the pattern. i.e. "EEEEE, MMMMM d, yyyy hh:mm aaa"

public synchronized void setTimeZone (TimeZone timeZone)