class RangerTimeOfDayMatcher extends RangerAbstractConditionEvaluator {

	boolean durationMatched(List<int[]> durations, int hourOfDay, int minutes) {
		for (int[] aDuration : durations) {
			int start = aDuration[0];
			int end = aDuration[1];
			int minutesOfDay = hourOfDay*60 + minutes;
			if(start < end) {
				if (start <= minutesOfDay && minutesOfDay <= end) {
					return true;
				}
			} else {
				if(start <= minutesOfDay || minutesOfDay <= end) {
					return true;
				}
			}
		}
		return false;
	}

}