aspose file tools*
The moose likes Beginning Java and the fly likes comparing 2 date objects...very urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "comparing 2 date objects...very urgent" Watch "comparing 2 date objects...very urgent" New topic
Author

comparing 2 date objects...very urgent

sumit vashishta
Greenhorn

Joined: Jun 14, 2001
Posts: 15
hi all,
how to compare 2 date objects....
when i use methods of Date class...i get a warning when using before(), after()
saying that they are deprecated...that is correct.
in what other way can i compare...
pl. give code as a hint..
thankx in advance
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
Use methods in the java.util.Calendar class.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Moving this from Servlet -> Java In General (Beginner)
Ryan Helton
Greenhorn

Joined: Oct 25, 2001
Posts: 11
After reading the 1.4 API docs it seems to me that before() and after() are still the best methods for comparing date objects. Why then would they be deprecated?
I still have a limited understanding of deprecated methods so I'm sure I'm just missing something here
Thanks!
Ryan


Ryan<p>---------------------------------<br />"We will stomp to the top with the wind in our teeth."
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
before/after of the date class are deprecated. There is still before/after for the Calendar class
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: comparing 2 date objects...very urgent
 
Similar Threads
Date comparison
Util package date
date has null or not checking
Question on String Buffer
How to check a date is within range of dates ?