aspose file tools*
The moose likes Beginning Java and the fly likes Is Date Between Two Dates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Is Date Between Two Dates" Watch "Is Date Between Two Dates" New topic

Is Date Between Two Dates

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
I have searched the web and have not found a good way to check and see if a given date is equal to or between two dates. Please help.
Joanne Neal

Joined: Aug 05, 2005
Posts: 3168
Did you look at the Date class ?

Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
You'll have to write it.
I'd suggest Calendar over Date, but either will do.

If the time of day for your Date/Calendar is set to zero, then it is of course a trivial exercise.

Try it, let us know how it goes.

Bill Shirley - bshirley -
if (Posts < 30) JavaRanchFAQ);
I agree. Here's the link:
subject: Is Date Between Two Dates
Similar Threads
Displaying tha Date between two dates in paint method...
Extracting months from Date object data
Generating a list of dates from a range
Calculate number of days between two dates
how do I find date difference in months