How to compare Time rather than Date or Calendar?

Hello all:

I know this is a old topic, but I still cannot get useful comments from old topic from this forum.

What I would like to do is very simple, but I cannot an efficient way to do it.

Start time: 5:00am

End time: 5:30pm.

Current Time: current system time.

I just want to know the way to compare the current time which should be in the range of start time and end time.

I do refer to Date and Calendar but they all use Day, month ...

I just want to do pure hour:min:sec comparison.

How?

any comments?

thank you

-Daniel

[602 byte] By [dolphin75a] at [2007-10-2 10:36:43]
# 1
Are you trying to see if current time falls in a range? Then just use the calendar to get the current hours, minutes etc and compare that.
dolphin75a at 2007-7-13 2:40:05 > top of Java-index,Java Essentials,Java Programming...
# 2
if((cal.get(Calendar.HOUR_OF_DAY)==5)&&(cal.get(Calendar.MINUTE)<=30))
dolphin75a at 2007-7-13 2:40:05 > top of Java-index,Java Essentials,Java Programming...