Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference in Date Calendar classes

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone explain the difference between the Date, Calendar and GregorianCalendar? I'm not sure how each is used.

Thanks.
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic