|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.lang.time.DateUtils org.kuali.rice.kns.util.DateUtils
public class DateUtils
Utility methods for comparing dates
Field Summary |
---|
Fields inherited from class org.apache.commons.lang.time.DateUtils |
---|
MILLIS_IN_DAY, MILLIS_IN_HOUR, MILLIS_IN_MINUTE, MILLIS_IN_SECOND, MILLIS_PER_DAY, MILLIS_PER_HOUR, MILLIS_PER_MINUTE, MILLIS_PER_SECOND, RANGE_MONTH_MONDAY, RANGE_MONTH_SUNDAY, RANGE_WEEK_CENTER, RANGE_WEEK_MONDAY, RANGE_WEEK_RELATIVE, RANGE_WEEK_SUNDAY, SEMI_MONTH, UTC_TIME_ZONE |
Constructor Summary | |
---|---|
DateUtils()
|
Method Summary | |
---|---|
static java.sql.Date |
clearTimeFields(java.sql.Date date)
Convert the given java.sql.date into a java.sql.date of which all the time fields are set to 0. |
static java.util.Date |
clearTimeFields(java.util.Date date)
Convert the given java.util.date into a java.util.date of which all the time fields are set to 0. |
static java.sql.Date |
convertToSqlDate(java.util.Date date)
Converts the given java.util.Date into an equivalent java.sql.Date |
static double |
getDifferenceInDays(java.sql.Timestamp startDateTime,
java.sql.Timestamp endDateTime)
|
static double |
getDifferenceInHours(java.sql.Timestamp startDateTime,
java.sql.Timestamp endDateTime)
|
static boolean |
isSameDay(java.util.Calendar cal1,
java.util.Calendar cal2)
Adds null-safety to commons.DateUtils isSameDay method. |
static boolean |
isSameDay(java.util.Date date1,
java.util.Date date2)
Adds null-safety to commons.DateUtils isSameDay method. |
static java.sql.Date |
newDate(java.lang.Integer year,
java.lang.Integer month,
java.lang.Integer day)
This method is a utility method to create a new java.sql.Date in one line. |
static java.sql.Date |
newDate(java.lang.Integer year,
java.lang.Integer month,
java.lang.Integer day,
java.lang.Integer hour,
java.lang.Integer minute,
java.lang.Integer second)
This method is a utility method to create a new java.sql.Date in one line. |
Methods inherited from class org.apache.commons.lang.time.DateUtils |
---|
add, addDays, addHours, addMilliseconds, addMinutes, addMonths, addSeconds, addWeeks, addYears, isSameInstant, isSameInstant, isSameLocalTime, iterator, iterator, iterator, parseDate, round, round, round, truncate, truncate, truncate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateUtils()
Method Detail |
---|
public static boolean isSameDay(java.util.Date date1, java.util.Date date2)
public static boolean isSameDay(java.util.Calendar cal1, java.util.Calendar cal2)
public static java.sql.Date convertToSqlDate(java.util.Date date)
date
-
public static java.sql.Date clearTimeFields(java.sql.Date date)
date
-
public static java.util.Date clearTimeFields(java.util.Date date)
date
-
public static double getDifferenceInDays(java.sql.Timestamp startDateTime, java.sql.Timestamp endDateTime)
startDateTime
- endDateTime
-
public static double getDifferenceInHours(java.sql.Timestamp startDateTime, java.sql.Timestamp endDateTime)
startDateTime
- endDateTime
-
public static java.sql.Date newDate(java.lang.Integer year, java.lang.Integer month, java.lang.Integer day)
year
- month
- day
-
public static java.sql.Date newDate(java.lang.Integer year, java.lang.Integer month, java.lang.Integer day, java.lang.Integer hour, java.lang.Integer minute, java.lang.Integer second)
year
- month
- day
- hour
- minute
- second
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |