|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.cafesoft.core.util.DateUtils
DateUtils is a class of methods for parsing, validating and otherwise working with dates.
| Constructor Summary | |
DateUtils()
|
|
| Method Summary | |
static String |
getLogFormattedDate()
Helper method that returns a specific date format that is used for log files. |
static String |
getLogFormattedDate(Date date)
Helper method that returns a specific date format that is used for log files. |
static String |
getLogFormattedDate(long date)
Helper method that returns a specific date format that is used for log files. |
static String |
isValidDate(String date,
String format)
Determine if a date is valid. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateUtils()
| Method Detail |
public static String getLogFormattedDate()
The date returned uses the following pattern:
dd/MMM/yyyy:HH:mm:ss ZZZ
For example, the date January 23, 2002 1:40:32 p.m. would be
formatted and returned to look like 23/Jan/2002:13:40:32 -0700
public static String getLogFormattedDate(Date date)
The date returned uses the following pattern:
dd/MMM/yyyy:HH:mm:ss ZZZ
For example, the date January 23, 2002 1:40:32 p.m. would be
formatted and returned to look like 23/Jan/2002:13:40:32 -0700
date - the date to be formatted
public static String getLogFormattedDate(long date)
The date returned uses the following pattern:
dd/MMM/yyyy:HH:mm:ss ZZZ
For example, the date January 23, 2002 1:40:32 p.m. would be
formatted and returned to look like 23/Jan/2002:13:40:32 -0700
date - the date to be formatted (in milleseconds)
public static String isValidDate(String date,
String format)
date - The date to parseformat - The format of the date. Formats include:
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||