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 java.lang.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(java.util.Locale locale)`
`DateFormatManager(java.util.Locale locale, java.lang.String pattern)`
`DateFormatManager(java.lang.String pattern)`
`DateFormatManager(java.util.TimeZone timeZone)`
`DateFormatManager(java.util.TimeZone timeZone, java.util.Locale locale)`
`DateFormatManager(java.util.TimeZone timeZone, java.util.Locale locale, java.lang.String pattern)`
`DateFormatManager(java.util.TimeZone timeZone, java.lang.String pattern)`

Method Summary
`java.lang.String` | `format(java.util.Date date)`
`java.lang.String` | `format(java.util.Date date, java.lang.String pattern)`
`java.text.DateFormat` | `getDateFormatInstance()`
`java.util.Locale` | `getLocale()`
`java.lang.String` | `getOutputFormat()` Deprecated. Use getPattern().
`java.lang.String` | `getPattern()`
`java.util.TimeZone` | `getTimeZone()`
`java.util.Date` | `parse(java.lang.String date)`
`java.util.Date` | `parse(java.lang.String date, java.lang.String pattern)`
`void` | `setDateFormatInstance(java.text.DateFormat dateFormat)`
`void` | `setLocale(java.util.Locale locale)`
`void` | `setOutputFormat(java.lang.String pattern)` Deprecated. Use setPattern().
`void` | `setPattern(java.lang.String pattern)` Set the pattern.
`void` | `setTimeZone(java.util.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(java.util.TimeZone timeZone)

### DateFormatManager

    public DateFormatManager(java.util.Locale locale)

### DateFormatManager

    public DateFormatManager(java.lang.String pattern)

### DateFormatManager

    public DateFormatManager(java.util.TimeZone timeZone,
                             java.util.Locale locale)

### DateFormatManager

    public DateFormatManager(java.util.TimeZone timeZone,
                             java.lang.String pattern)

### DateFormatManager

    public DateFormatManager(java.util.Locale locale,
                             java.lang.String pattern)

### DateFormatManager

    public DateFormatManager(java.util.TimeZone timeZone,
                             java.util.Locale locale,
                             java.lang.String pattern)

Method Detail

### getTimeZone

    public java.util.TimeZone getTimeZone()

### setTimeZone

    public void setTimeZone(java.util.TimeZone timeZone)

### getLocale

    public java.util.Locale getLocale()

### setLocale

    public void setLocale(java.util.Locale locale)

### getPattern

    public java.lang.String getPattern()

### setPattern

    public void setPattern(java.lang.String pattern)

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

### getOutputFormat

    public java.lang.String getOutputFormat()

  Deprecated. Use getPattern().

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

### setOutputFormat

    public void setOutputFormat(java.lang.String pattern)

  Deprecated. Use setPattern().

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

### getDateFormatInstance

    public java.text.DateFormat getDateFormatInstance()

### setDateFormatInstance

    public void setDateFormatInstance(java.text.DateFormat dateFormat)

### format

    public java.lang.String format(java.util.Date date)

### format

    public java.lang.String format(java.util.Date date,
                                   java.lang.String pattern)

### parse

    public java.util.Date parse(java.lang.String date)
                         throws java.text.ParseException

  Throws:
    `java.text.ParseException`

### parse

    public java.util.Date parse(java.lang.String date,
                                java.lang.String pattern)
                         throws java.text.ParseException

  Throws:
    `java.text.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-2007 Apache Software Foundation. All Rights Reserved.