|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 Date |
clearTimeFields(Date date)
Convert the given java.sql.date into a java.sql.date of which all the time fields are set to 0. |
static Date |
clearTimeFields(Date date)
Convert the given java.util.date into a java.util.date of which all the time fields are set to 0. |
static Date |
convertToSqlDate(Date date)
Converts the given java.util.Date into an equivalent java.sql.Date |
static double |
getDifferenceInDays(Timestamp startDateTime,
Timestamp endDateTime)
|
static double |
getDifferenceInHours(Timestamp startDateTime,
Timestamp endDateTime)
|
static boolean |
isSameDay(Calendar cal1,
Calendar cal2)
Adds null-safety to commons.DateUtils isSameDay method. |
static boolean |
isSameDay(Date date1,
Date date2)
Adds null-safety to commons.DateUtils isSameDay method. |
static Date |
newDate(Integer year,
Integer month,
Integer day)
This method is a utility method to create a new java.sql.Date in one line. |
static Date |
newDate(Integer year,
Integer month,
Integer day,
Integer hour,
Integer minute,
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(Date date1, Date date2)
public static boolean isSameDay(Calendar cal1, Calendar cal2)
public static Date convertToSqlDate(Date date)
date
-
public static Date clearTimeFields(Date date)
date
-
public static Date clearTimeFields(Date date)
date
-
public static double getDifferenceInDays(Timestamp startDateTime, Timestamp endDateTime)
startDateTime
- endDateTime
-
public static double getDifferenceInHours(Timestamp startDateTime, Timestamp endDateTime)
startDateTime
- endDateTime
-
public static Date newDate(Integer year, Integer month, Integer day)
year
- month
- day
-
public static Date newDate(Integer year, Integer month, Integer day, Integer hour, Integer minute, Integer second)
year
- month
- day
- hour
- minute
- second
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |