This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Quick Date Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Quick Date Question" Watch "Quick Date Question" New topic

Quick Date Question

Jolly Khanna

Joined: Sep 24, 2001
Posts: 12
I was wondering how can I compare today's date to see if it is before or after a date entered by the user in the format: MM/DD/yyyy?
Do I have to parse the data first and then compare?
John Spindler

Joined: Feb 12, 2002
Posts: 28
Have a look.
Jolly Khanna

Joined: Sep 24, 2001
Posts: 12
That's great! Thanks John.
But what if I want to check if the requested date is 2 days later than today's date? Is there a method that I can simply add a number of days to the date which will automaically rollover to the next month? EX. If date=2/28/2002 and I want to add 2 days, will it automaically jump to March 2?
I agree. Here's the link:
subject: Quick Date Question
jQuery in Action, 3rd edition