aspose file tools*
The moose likes Java in General and the fly likes Difference in Date Calendar classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Difference in Date Calendar classes" Watch "Difference in Date Calendar classes" New topic
Author

Difference in Date Calendar classes

Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
Can someone explain the difference between the Date, Calendar and GregorianCalendar? I'm not sure how each is used.

Thanks.
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
Date represents a specific point in time.

Calendar is an abstract class that defines methods for converting, comparing or manipulating points in time.

GregorianCalendar extends Calendar and implements the logic necessary for converting, comparing or manipulating dates according to the calendar created by Pope Gregory XIII.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Difference in Date Calendar classes