Possible Duplicate:
How do I compare a raw time in Java?
For example suppose I have
String endTime = "16:30:45";
How would I determine whether right now is before this time? I have tried
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss")
Date date = sdf.parse(endTime);
However date has year 1970 and so the comparisons fail
You can always do the inverse: