Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.log4j.lf5.util
Class DateFormatManager

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

    public class DateFormatManager

extends Object

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.

Author:
  Robert Shaw, Michael J. Sikorsky

Constructor Summary
`DateFormatManager()`
`DateFormatManager(Locale locale)`
`DateFormatManager(Locale locale, String pattern)`
`DateFormatManager(String pattern)`
`DateFormatManager(TimeZone timeZone)`
`DateFormatManager(TimeZone timeZone, Locale locale)`
`DateFormatManager(TimeZone timeZone, Locale locale, String pattern)`
`DateFormatManager(TimeZone timeZone, String pattern)`

Method Summary
`String` | `format(Date date)`
`String` | `format(Date date, String pattern)`
`DateFormat` | `getDateFormatInstance()`
`Locale` | `getLocale()`
`String` | `getOutputFormat()` Deprecated. Use getPattern().
`String` | `getPattern()`
`TimeZone` | `getTimeZone()`
`Date` | `parse(String date)`
`Date` | `parse(String date, String pattern)`
`void` | `setDateFormatInstance(DateFormat dateFormat)`
`void` | `setLocale(Locale locale)`
`void` | `setOutputFormat(String pattern)` Deprecated. Use setPattern().
`void` | `setPattern(String pattern)` Set the pattern.
`void` | `setTimeZone(TimeZone timeZone)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DateFormatManager

    public DateFormatManager()

### DateFormatManager

    public DateFormatManager(TimeZone timeZone)

### DateFormatManager

    public DateFormatManager(Locale locale)

### DateFormatManager

    public DateFormatManager(String pattern)

### DateFormatManager

    public DateFormatManager(TimeZone timeZone,
                             Locale locale)

### DateFormatManager

    public DateFormatManager(TimeZone timeZone,
                             String pattern)

### DateFormatManager

    public DateFormatManager(Locale locale,
                             String pattern)

### DateFormatManager

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

Method Detail

### getTimeZone

    public TimeZone getTimeZone()

### setTimeZone

    public void setTimeZone(TimeZone timeZone)

### getLocale

    public Locale getLocale()

### setLocale

    public void setLocale(Locale locale)

### getPattern

    public String getPattern()

### setPattern

    public void setPattern(String pattern)

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

### getOutputFormat

    public String getOutputFormat()

  Deprecated. Use getPattern().

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

### setOutputFormat

    public void setOutputFormat(String pattern)

  Deprecated. Use setPattern().

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

### getDateFormatInstance

    public DateFormat getDateFormatInstance()

### setDateFormatInstance

    public void setDateFormatInstance(DateFormat dateFormat)

### format

    public String format(Date date)

### format

    public String format(Date date,
                         String pattern)

### parse

    public Date parse(String date)
               throws ParseException

  Throws:
    `ParseException`

### parse

    public Date parse(String date,
                      String pattern)
               throws ParseException

  Throws:
    `ParseException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.