I have a method which takes the argument of two time strings Eg: t1 - 09:00 and t2 - 15:00 and a Date argument.
I want to achieve to a solution where the given time from date is with or within the passed timeframe or not.
Thanks in advance
public class CheckTime {
private boolean isOpen;
public boolean isValid(String time1, String time2, Date date) {
----Logic goes here------
return isOpen;
}
public static void main(String[] args) {
new CheckTime().isValid("09:00","15:00",
new Date(System.currentTimeMillis()));
}
}