|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.slim3.commons.util.DateUtil
public final class DateUtil
A utility class for Date.
| Method Summary | |
|---|---|
static String |
getPattern(Locale locale)
Returns the pattern for the locale. |
static Date |
toDate(Object o)
Converts the object to Date. |
protected static Date |
toDate(String text,
Locale locale)
Converts the text to Date. |
static Date |
toDate(String text,
String pattern)
Converts the text to Date. |
static String |
toString(Date value,
String pattern)
Converts the Date value to text. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Date toDate(Object o)
Date.
o - the object
public static Date toDate(String text,
String pattern)
throws NullPointerException,
ParseRuntimeException
Date.
text - the textpattern - the pattern for SimpleDateFormat
NullPointerException - if the pattern parameter is null
ParseRuntimeException - if ParseException is encountered
public static String toString(Date value,
String pattern)
Date value to text.
value - the Date valuepattern - the pattern for SimpleDateFormat
protected static Date toDate(String text,
Locale locale)
throws ParseRuntimeException
Date.
text - the textlocale - the locale
ParseRuntimeException - if ParseException is encounteredpublic static String getPattern(Locale locale)
locale - the locale
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||