GregorianCalendar


GregorianCalendar java.util

Java 1.1 cloneable serializable comparable

This concrete subclass of Calendar implements the standard solar calendar with years numbered from the birth of Christ that is used is most locales throughout the world. You do not typically use this class directly, but instead obtain a Calendar object suitable for the default locale by calling Calendar.getInstance( ) . See Calendar for details on working with Calendar objects. There is a discontinuity in the Gregorian calendar that represents the historical switch from the Julian calendar to the Gregorian calendar. By default, GregorianCalendar assumes that this switch occurs on October 15, 1582. Most programs need not be concerned with the switch.

Figure 16-23. java.util.GregorianCalendar

 public class  GregorianCalendar  extends Calendar {  // Public Constructors  public  GregorianCalendar  ( );        public  GregorianCalendar  (Locale  aLocale  );        public  GregorianCalendar  (TimeZone  zone  );        public  GregorianCalendar  (TimeZone  zone  , Locale  aLocale  );        public  GregorianCalendar  (int  year  , int  month  , int  dayOfMonth  );        public  GregorianCalendar  (int  year  , int  month  , int  dayOfMonth  , int  hourOfDay  ,          int  minute  );        public  GregorianCalendar  (int  year  , int  month  , int  dayOfMonth  , int  hourOfDay  , int  minute  ,          int  second  );  // Public Constants  public static final int  AD  ;  =1  public static final int  BC  ;  =0   // Public Instance Methods  public final Date  getGregorianChange  ( );        public boolean  isLeapYear  (int  year  );        public void  setGregorianChange  (Date  date  );  // Public Methods Overriding Calendar  public void  add  (int  field  , int  amount  );  5.0  public Object  clone  ( );        public boolean  equals  (Object  obj  );  1.2  public int  getActualMaximum  (int  field  );  1.2  public int  getActualMinimum  (int  field  );        public int  getGreatestMinimum  (int  field  );        public int  getLeastMaximum  (int  field  );        public int  getMaximum  (int  field  );        public int  getMinimum  (int  field  );  5.0  public TimeZone  getTimeZone  ( );        public int  hashCode  ( );        public void  roll  (int  field  , boolean  up  );  1.2  public void  roll  (int  field  , int  amount  );  5.0  public void  setTimeZone  (TimeZone  zone  );  // Protected Methods Overriding Calendar  protected void  computeFields  ( );        protected void  computeTime  ( );   } 

Passed To

javax.xml.datatype.DatatypeFactory.newXMLGregorianCalendar( )

Returned By

javax.xml.datatype.XMLGregorianCalendar.toGregorianCalendar( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net