Calendar object using after method with util.Date object

Hi All,

I ran into an issue of sorts after converting some old code to remove deprecated Date method calls. In the end I had some code using a Calendar object doing an after() compare with a java.util.Date object. I had overlooked the fact that a partcular method call was returning a java.util.Date and not a Calendar object. Well the Calendar.after() method didnt complain at all but always returned false. The javadoc shows the after method accepts an Object object but the description reads like it is expecting a Calendar object. I had no control over the method that was returning the java.util.Date so I could either make a new Calendar object from the java.util.Date object or do something like

calendar.getTime().after(returnDate);

Why did the calendar.after(returnDate);

always return false? any ideas?

Thanks

[859 byte] By [Katarn321a] at [2007-10-2 4:38:26]
# 1
> Why did the calendar.after(returnDate);> ] always return false? any ideas?That's just how the method is designed I guess.
tjacobs01a at 2007-7-16 0:11:28 > top of Java-index,Java Essentials,Java Programming...