|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.oddjob.schedules.DateUtils
Utility methods to do things with dates and intervals.
| Method Summary | |
static int |
compare(java.util.Calendar c1,
java.util.Calendar c2)
Compare to calendars. |
static int |
dayOfMonth(java.util.Date inDate,
java.util.TimeZone timeZone)
Calculate the day of the month (1 - 31) for the given date. |
static int |
dayOfWeek(java.util.Date inDate,
java.util.TimeZone timeZone)
Calculate the day number for the given date. |
static int |
dayOfYear(java.util.Date forDate,
java.util.TimeZone timeZone)
Calculate the day of the year for the given date. |
static java.util.Date |
endOfDay(java.util.Date inDate,
java.util.TimeZone timeZone)
Calculate the date time at the end of the day (one millisecond before midnight) for the given date. |
static int |
month(java.util.Date inDate,
java.util.TimeZone timeZone)
Calcuate the month number (0 - 11) for the given date. |
static java.util.Date |
oneMillisAfter(java.util.Date date)
Return a date which is 1 millisecond after the given date. |
static java.util.Date |
oneMillisBefore(java.util.Date date)
Return a date which is 1 millisecond before the given date. |
static java.util.Date |
startOfDay(java.util.Date inDate,
java.util.TimeZone timeZone)
Calculate the start of day date time (i.e. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static java.util.Date startOfDay(java.util.Date inDate,
java.util.TimeZone timeZone)
inDate - The date to cacluate start of day from.
public static java.util.Date endOfDay(java.util.Date inDate,
java.util.TimeZone timeZone)
inDate - The given date.
public static int dayOfWeek(java.util.Date inDate,
java.util.TimeZone timeZone)
inDate - The given date.
public static int month(java.util.Date inDate,
java.util.TimeZone timeZone)
inDate - The given date.
public static int dayOfMonth(java.util.Date inDate,
java.util.TimeZone timeZone)
inDate - The given date.
public static int dayOfYear(java.util.Date forDate,
java.util.TimeZone timeZone)
forDate - The date.
public static java.util.Date oneMillisAfter(java.util.Date date)
date - The given date.
public static java.util.Date oneMillisBefore(java.util.Date date)
date - The given date.
public static int compare(java.util.Calendar c1,
java.util.Calendar c2)
c1 - First calendar.c2 - Second calendar
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||