Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.Date; public class Main { public static boolean isWithinRange(long toCheck, long start, long end) { return isWithinRange(new Date(toCheck), new Date(start), new Date(end)); } public static boolean isWithinRange(Date toCheck, Date start, Date end) { return !(toCheck.before(start) || toCheck.after(end)); } }