Alex Rivera | Logout

Check if date is within time range using Joda or standard Java API

Asked 2010-05-25T07:31:38.020
16

I have first time as string '12:00:00' and another '19:00:00'. How to check time portion of the day is within these time values?

Edit
Report

1 Answer

-1

Create calendar instances of the start and end times for the same day as your 'test' date. Then you can easily compare the calendar objects to determine if the current date is inside or outside the range.

answered 2010-05-25T07:37:31.173

Your Answer