|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.oddjob.util.DateHelper
Date Helper Utilities
| Constructor Summary | |
DateHelper()
|
|
| Method Summary | |
static java.lang.String |
formatDate(java.util.Date date)
Format a date into just text representing just the date. |
static java.util.Date |
parseDate(java.lang.String text)
Parse a date using the default time zone. |
static java.util.Date |
parseDate(java.lang.String text,
java.lang.String timeZoneId)
Parse a date using the given time zone. |
static java.util.Date |
parseDate(java.lang.String text,
java.util.TimeZone timeZone)
Parse a date using the given time zone. |
static java.util.Date |
parseDateTime(java.lang.String text)
Parse a date and time. |
static java.util.Date |
parseDateTime(java.lang.String text,
java.lang.String timeZoneId)
Parse a date and time in the given time zone. |
static java.util.Date |
parseDateTime(java.lang.String text,
java.util.TimeZone timeZone)
Parse a date and time in the given time zone. |
static long |
parseTime(java.lang.String text)
Parse a time into a number of milliseconds. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateHelper()
| Method Detail |
public static java.util.Date parseDateTime(java.lang.String text)
throws java.text.ParseException
text - The date time.
java.text.ParseException - If the text isn't in a recognized
date/time foramt.
public static java.util.Date parseDateTime(java.lang.String text,
java.lang.String timeZoneId)
throws java.text.ParseException
text - The date time.timeZoneId - The time zone identifier.
java.text.ParseException - If the text isn't in a recognized
date/time foramt.
public static java.util.Date parseDateTime(java.lang.String text,
java.util.TimeZone timeZone)
throws java.text.ParseException
text - The date timetimeZone - The timeZone.
java.text.ParseException - If the text isn't in a recognized
date/time foramt.
public static java.util.Date parseDate(java.lang.String text)
throws java.text.ParseException
text - A date.
java.text.ParseException - If the date isn't in the recognized
date format.
public static java.util.Date parseDate(java.lang.String text,
java.lang.String timeZoneId)
throws java.text.ParseException
text - The date text.timeZoneId - The time zone identifier.
java.text.ParseException - If the date isn't in the recognized
date format.
public static java.util.Date parseDate(java.lang.String text,
java.util.TimeZone timeZone)
throws java.text.ParseException
text - The date text.timeZone - The time zone.
java.text.ParseException - If the date isn't in the recognized
date format.
public static long parseTime(java.lang.String text)
throws java.text.ParseException
text - The time.
java.text.ParseException - If pasing fails.public static java.lang.String formatDate(java.util.Date date)
date - The date
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||