|
Dashboard Builder Commons 6.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dashboard.commons.text.DateFormatUtil
public class DateFormatUtil
Utilities for formatting and parsing dates.
| Method Summary | |
|---|---|
static String |
dateToOracleStr(Timestamp ts)
Contains some Oracle specific fixes to the timestamp. |
static String |
dateToStr(Date date)
Formats a Date into a date string. |
static String |
dateToUTCStr(Date UTCDate)
Turns a UTCTime in a java.util.Date object into a String object. |
static boolean |
isLongDate(Timestamp date)
Tells whether Timestamp is in long format: with hours, minutes and seconds fields. |
static boolean |
isValidDate(String text)
Tells whether date/time string is in the format "dd/MM/yyyy". |
static Timestamp |
nativeStrToTimestamp(String text)
Parse a native date/time string. |
static Timestamp |
strToTimestamp(String text)
Parse a date/time string. |
static String |
timeToStr(Date date)
Formats a Date into a time string. |
static Date |
utcStrToDate(String UTCTime)
Turns a UTCTime in string format into a java.util.Date object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isLongDate(Timestamp date)
date - the time value to be tested
public static boolean isValidDate(String text)
throws ParseException
text - the date/time string to be tested
ParseExceptionpublic static String timeToStr(Date date)
date - the time value to be formatted into a time string.
public static String dateToStr(Date date)
date - the time value to be formatted into a date string.
public static Timestamp strToTimestamp(String text)
throws ParseException
text - The date/time string to be parsed
ParseException - If the given string cannot be parsed as a date
public static Timestamp nativeStrToTimestamp(String text)
throws ParseException
text - The date/time string to be parsed
ParseException - If the given string cannot be parsed as a date
public static String dateToUTCStr(Date UTCDate)
throws ParseException
UTCDate - Date with a UTCTime date
ParseException
public static Date utcStrToDate(String UTCTime)
throws ParseException
UTCTime - String with a UTCTime date
ParseExceptionpublic static String dateToOracleStr(Timestamp ts)
|
Dashboard Builder Commons 6.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||