Originally posted by Tanveer Rameez:
Lot of methods of the java.util.Date class has been decrepated. Check the apis for GregorianCalendar. It can be used instead of Date class.
I would venture to say that the GregorianCalendar and Date classes are NOT completely interchangeable. I think deprecating the Date API was an effort to make Date immutable, somewhat like
String is. In fact, I've seen the comparison drawn between String and StringBuffer. In many respects Calendar is to Date as StringBuffer is to String.
Besides this still wouldn't solve the OP's problem since Calendar (or its subclasses, like GregorianCalendar) still store the time AND date together as a single entity.
Layne