public class DateUtility
extends java.lang.Object
Constructor and Description |
---|
DateUtility() |
Modifier and Type | Method and Description |
---|---|
static java.util.Date |
addDays(java.util.Date date,
int plusDays)
Add a number of days to a date.
|
static java.util.Date |
addMinutes(java.util.Date date,
int plusMinutes)
Add a number of minutes to a date.
|
static java.util.Date |
addSeconds(java.util.Date date,
int plusSeconds)
Add a number of seconds to a date.
|
static java.util.Date |
combineDate(java.util.Date date1,
java.util.Date date2)
Make a new Date from the date part of date1 and time part of date2
|
static int |
compareTime(java.util.Date date1,
java.util.Date date2)
See if date1 if before date2 in hours/minutes only.
|
static double |
convertToMinutes(double time,
java.lang.String uom)
convert a time to number of minutes based on the unit of measure.
The uom can be one of these, MINUTES HOURS DAYS |
static java.util.Date |
getDate(java.util.Date date)
Get the date with hour/minute/second/millisecond stripped
|
static int |
timeDiff(java.util.Date date1,
java.util.Date date2)
Time difference(in minutes) between date1 and date2 in hours/minutes.
|
public static double convertToMinutes(double time, java.lang.String uom)
public static java.util.Date getDate(java.util.Date date)
public static java.util.Date addDays(java.util.Date date, int plusDays)
public static java.util.Date addMinutes(java.util.Date date, int plusMinutes)
public static java.util.Date addSeconds(java.util.Date date, int plusSeconds)
public static int compareTime(java.util.Date date1, java.util.Date date2)
public static int timeDiff(java.util.Date date1, java.util.Date date2)
public static java.util.Date combineDate(java.util.Date date1, java.util.Date date2)