This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Artima Forums.
Message:
Calendar class
Posted by Monte on February 26, 2001 at 2:05 PM
I'm trying to create a class that behaves differently at different times. The calendar class seems to be the one to use to deal with date and time issues. However, I'm having a hard time understanding the official API for Calendar class. Specifically, I need to be able to compare two Calendar objects and find out what the difference in hours,days, and weeks is between the two. Also, I need to be able to tell if two dates are in the same week/month/year Can someone explain this to me, or tell me where I can find more information on the Calendar class? --thanks
Replies:
|