|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.calitha.util.DateUtil
public final class DateUtil
The DateUtil class contains a collection of convenience methods for using dates and calendars.
| Method Summary | |
|---|---|
static String |
formatCalendar(Calendar calendar,
String pattern)
Formats a calendar. |
static String |
formatCalendar(Calendar calendar,
String pattern,
TimeZone timezone)
Formats a calendar. |
static String |
formatCurrentDate(String pattern)
Formats the current date. |
static String |
formatDate(Date date,
String pattern)
Formats a date. |
static String |
formatDate(Date date,
String pattern,
TimeZone timezone)
Formats a date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String formatDate(Date date,
String pattern,
TimeZone timezone)
The date is formatted by applying the pattern. The timezone determines the offset compared to GMT.
date - date to be formattedpattern - pattern that determines the format of the datetimezone - timezone
IllegalArgumentException - if an argument is null
public static String formatDate(Date date,
String pattern)
The date is formatted by applying the pattern. The default system timezone is used.
date - date to be formattedpattern - pattern that determines the format of the date
IllegalArgumentException - if an argument is nullpublic static String formatCurrentDate(String pattern)
The date is formatted by applying the pattern. The default systen timezone is used.
pattern - pattern that determines the format of the date
IllegalArgumentException - if an argument is null
public static String formatCalendar(Calendar calendar,
String pattern)
The calendar is formatted by applying the pattern. The default system timezone is used.
calendar - calender to be formattedpattern - pattern that determines the format of the date
IllegalArgumentException - if an argument is null
public static String formatCalendar(Calendar calendar,
String pattern,
TimeZone timezone)
The calendar is formatted by applying the pattern. The timezone determines the offset compared to GMT.
calendar - calender to be formattedpattern - pattern that determines the format of the datetimezone - timezone used to format the date
IllegalArgumentException - if an argument is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||