public class TimeUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
checkTimeInRangeWithSkew(java.util.Date timeToCheck,
java.util.Date startDate,
java.util.Date endDate,
int skewInMinutes)
Checks that a date falls in the interval allowing for a certain clock skew
expressed in minutes.
|
public static boolean checkTimeInRangeWithSkew(java.util.Date timeToCheck, java.util.Date startDate, java.util.Date endDate, int skewInMinutes)
timeToCheck
- the time to be checkedstartDate
- the start date of the time rangeendDate
- the end date of the time rangeskewInMinutes
- the clock skew in minutes to take into accounttrue
, if the time is in the given range,
false
otherwisejava.lang.IllegalArgumentException
- if passed an illegal time range