• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

GregorianCalendar or Calender

 
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hallo !

Im have to use a date, i can use GregorianCalendar or Calender, what do Sun recomend that i use, or why use Calender or Why use GregorianCalender ???
As i see it i can do the same things with GregorianCalendar and with Calender ???

Frank Jacobsen

 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank,

the answer is:

This usually returns a GregorianCalendar, which represents our (Western) calendar. The calendar object is initialized with the system's time and date. java.util.Calendar is the abstract superclass for calendar objects such as GregorianCalendar. Other calendar's - for example, a Japanese one - may interpret the system's time in another way. However, the only implemented calendar type is the Gregorian one so far.

For more details check the JavaDoc for java.util.Calendar.

Hope this helps.
[ June 25, 2004: Message edited by: Mag Hoehme ]
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seeing as you can't instantiate Calendar (it's an abstract class) there is little to choose...

Effectively you use both together. An instance of GregorianCalendar and static methods and finals from Calendar.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic