|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.bea.domingo.util.DateUtil
public final class DateUtil
Static utility methods for date operations and conversions.
Field Summary | |
---|---|
static java.lang.String |
DATE_FORMAT
Date format used for parsing. |
static java.lang.String |
DATE_TIME_FORMAT
Date/time format used for parsing. |
static java.lang.String |
TIME_FORMAT
Time format used for parsing. |
Method Summary | |
---|---|
static java.lang.String |
getDateString(java.util.Calendar calendar)
Formats the date of a Calendar instance to a String. |
static java.lang.String |
getDateString(java.util.Calendar calendar,
java.util.Locale locale)
Formats the date of a Calendar instance to a String. |
static java.lang.String |
getDateTimeString(java.util.Calendar calendar)
Formats the date and time time of a Calendar instance to a String. |
static java.lang.String |
getDateTimeString(java.util.Calendar date,
java.util.Calendar time)
Formats the date and time time of a Calendar instance to a String. |
static java.lang.String |
getDateTimeString(java.util.Calendar date,
java.util.Calendar time,
java.util.Locale locale)
Formats the date and time time of a Calendar instance to a String. |
static java.lang.String |
getDateTimeString(java.util.Calendar calendar,
java.util.Locale locale)
Formats the date and time time of a Calendar instance to a String. |
static java.lang.String |
getTimeString(java.util.Calendar calendar)
Formats the time of a Calendar instance to a String. |
static java.lang.String |
getTimeString(java.util.Calendar calendar,
java.util.Locale locale)
Formats the time of a Calendar instance to a String. |
static java.util.Calendar |
parseDate(java.lang.String date,
boolean adjustToLocalTimeZone)
Parses a date given as a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DATE_FORMAT
public static final java.lang.String TIME_FORMAT
public static final java.lang.String DATE_TIME_FORMAT
Method Detail |
---|
public static java.util.Calendar parseDate(java.lang.String date, boolean adjustToLocalTimeZone) throws java.lang.IndexOutOfBoundsException, java.lang.NumberFormatException
DATE_TIME_FORMAT
.
date
- a date formatted as a stringadjustToLocalTimeZone
- if result should be adjusted to local time zone or not
java.lang.IndexOutOfBoundsException
- if the String is too short
java.lang.NumberFormatException
- if a date/time component is out of range or cannot be parsedpublic static java.lang.String getDateTimeString(java.util.Calendar date, java.util.Calendar time)
date
- the date as a java.util.Calendartime
- the time as a java.util.Calendar
public static java.lang.String getDateTimeString(java.util.Calendar date, java.util.Calendar time, java.util.Locale locale)
date
- the date as a java.util.Calendartime
- the time as a java.util.Calendarlocale
- locale
public static java.lang.String getDateTimeString(java.util.Calendar calendar)
calendar
- the date as a java.util.Calendar
public static java.lang.String getDateTimeString(java.util.Calendar calendar, java.util.Locale locale)
calendar
- the date as a java.util.Calendarlocale
- locale
public static java.lang.String getDateString(java.util.Calendar calendar)
calendar
- the date as a java.util.Calendar
public static java.lang.String getDateString(java.util.Calendar calendar, java.util.Locale locale)
calendar
- the date as a java.util.Calendarlocale
- locale
public static java.lang.String getTimeString(java.util.Calendar calendar)
calendar
- the date as a java.util.Calendar
public static java.lang.String getTimeString(java.util.Calendar calendar, java.util.Locale locale)
calendar
- the date as a java.util.Calendarlocale
- locale
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |