public class TimeRangeChecker extends Object
| Constructor and Description |
|---|
TimeRangeChecker() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isTimeInRange(List<String> days,
String startTimeStr,
String endTimeStr,
org.joda.time.DateTime currentTime)
Checks if a specified time is on a day that is specified the a given
List of acceptable days, and that the
hours + minutes of the specified time fall into a range defined by startTimeStr and endTimeStr. |
public static boolean isTimeInRange(List<String> days, String startTimeStr, String endTimeStr, org.joda.time.DateTime currentTime)
List of acceptable days, and that the
hours + minutes of the specified time fall into a range defined by startTimeStr and endTimeStr.days - is a List of days, if the specified DateTime does not have a day that falls is in this
List then this method will return false.startTimeStr - defines the start range that the currentTime can fall into. This String should be of
the pattern defined by HOUR_MINUTE_FORMAT.endTimeStr - defines the start range that the currentTime can fall into. This String should be of
the pattern defined by HOUR_MINUTE_FORMAT.currentTime - is a DateTime for which this method will check if it is in the given List of
days and falls into the time range defined by startTimeStr and endTimeStr.