|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log4j.lf5.util.DateFormatManager
public class DateFormatManager
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.
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 |
---|
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)
Method Detail |
---|
public TimeZone getTimeZone()
public void setTimeZone(TimeZone timeZone)
public Locale getLocale()
public void setLocale(Locale locale)
public String getPattern()
public void setPattern(String pattern)
public String getOutputFormat()
public void setOutputFormat(String pattern)
public DateFormat getDateFormatInstance()
public void setDateFormatInstance(DateFormat dateFormat)
public String format(Date date)
public String format(Date date, String pattern)
public Date parse(String date) throws ParseException
ParseException
public Date parse(String date, String pattern) throws ParseException
ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |