1 *java.util.GregorianCalendar* *GregorianCalendar* GregorianCalendar is a concret
3 public class GregorianCalendar
4 extends |java.util.Calendar|
6 |java.util.GregorianCalendar_Description|
7 |java.util.GregorianCalendar_Fields|
8 |java.util.GregorianCalendar_Constructors|
9 |java.util.GregorianCalendar_Methods|
11 ================================================================================
13 *java.util.GregorianCalendar_Fields*
14 |int_java.util.GregorianCalendar.AD|
15 |int_java.util.GregorianCalendar.BC|
17 *java.util.GregorianCalendar_Constructors*
18 |java.util.GregorianCalendar()|Constructs a default GregorianCalendar using the
19 |java.util.GregorianCalendar(int,int,int)|Constructs a GregorianCalendar with t
20 |java.util.GregorianCalendar(int,int,int,int,int)|Constructs a GregorianCalenda
21 |java.util.GregorianCalendar(int,int,int,int,int,int)|Constructs a GregorianCal
22 |java.util.GregorianCalendar(Locale)|Constructs a GregorianCalendar based on th
23 |java.util.GregorianCalendar(TimeZone)|Constructs a GregorianCalendar based on
24 |java.util.GregorianCalendar(TimeZone,Locale)|Constructs a GregorianCalendar ba
26 *java.util.GregorianCalendar_Methods*
27 |java.util.GregorianCalendar.add(int,int)|Adds the specified (signed) amount of
28 |java.util.GregorianCalendar.clone()|
29 |java.util.GregorianCalendar.computeFields()|Converts the time value (milliseco
30 |java.util.GregorianCalendar.computeTime()|Converts calendar field values to th
31 |java.util.GregorianCalendar.equals(Object)|Compares this GregorianCalendar to
32 |java.util.GregorianCalendar.getActualMaximum(int)|Returns the maximum value th
33 |java.util.GregorianCalendar.getActualMinimum(int)|Returns the minimum value th
34 |java.util.GregorianCalendar.getGreatestMinimum(int)|Returns the highest minimu
35 |java.util.GregorianCalendar.getGregorianChange()|Gets the Gregorian Calendar c
36 |java.util.GregorianCalendar.getLeastMaximum(int)|Returns the lowest maximum va
37 |java.util.GregorianCalendar.getMaximum(int)|Returns the maximum value for the
38 |java.util.GregorianCalendar.getMinimum(int)|Returns the minimum value for the
39 |java.util.GregorianCalendar.getTimeZone()|
40 |java.util.GregorianCalendar.hashCode()|Generates the hash code for this Gregor
41 |java.util.GregorianCalendar.isLeapYear(int)|Determines if the given year is a
42 |java.util.GregorianCalendar.roll(int,boolean)|Adds or subtracts (up/down) a si
43 |java.util.GregorianCalendar.roll(int,int)|Adds a signed amount to the specifie
44 |java.util.GregorianCalendar.setGregorianChange(Date)|Sets the GregorianCalenda
45 |java.util.GregorianCalendar.setTimeZone(TimeZone)|
47 *java.util.GregorianCalendar_Description*
49 GregorianCalendar is a concrete subclass of Calendar and provides the standard
50 calendar system used by most of the world.
52 GregorianCalendar is a hybrid calendar that supports both the Julian and
53 Gregorian calendar systems with the support of a single discontinuity, which
54 corresponds by default to the Gregorian date when the Gregorian calendar was
55 instituted (October 15, 1582 in some countries, later in others). The cutover
56 date may be changed by the caller by calling
57 setGregorianChange()(|java.util.GregorianCalendar|) .
59 Historically, in those countries which adopted the Gregorian calendar first,
60 October 4, 1582 (Julian) was thus followed by October 15, 1582 (Gregorian).
61 This calendar models this correctly. Before the Gregorian cutover,
62 GregorianCalendar implements the Julian calendar. The only difference between
63 the Gregorian and the Julian calendar is the leap year rule. The Julian
64 calendar specifies leap years every four years, whereas the Gregorian calendar
65 omits century years which are not divisible by 400.
67 GregorianCalendar implements proleptic Gregorian and Julian calendars. That is,
68 dates are computed by extrapolating the current rules indefinitely far backward
69 and forward in time. As a result, GregorianCalendar may be used for all years
70 to generate meaningful and consistent results. However, dates obtained using
71 GregorianCalendar are historically accurate only from March 1, 4 AD onward,
72 when modern Julian calendar rules were adopted. Before this date, leap year
73 rules were applied irregularly, and before 45 BC the Julian calendar did not
76 Prior to the institution of the Gregorian calendar, New Year's Day was March
77 25. To avoid confusion, this calendar always uses January 1. A manual
78 adjustment may be made if desired for dates that are prior to the Gregorian
79 changeover and which fall between January 1 and March 24.
81 Values calculated for the WEEK_OF_YEAR field range from 1 to 53. Week 1 for a
82 year is the earliest seven day period starting on getFirstDayOfWeek() that
83 contains at least getMinimalDaysInFirstWeek() days from that year. It thus
84 depends on the values of getMinimalDaysInFirstWeek(), getFirstDayOfWeek(), and
85 the day of the week of January 1. Weeks between week 1 of one year and week 1
86 of the following year are numbered sequentially from 2 to 52 or 53 (as needed).
88 For example, January 1, 1998 was a Thursday. If getFirstDayOfWeek() is MONDAY
89 and getMinimalDaysInFirstWeek() is 4 (these are the values reflecting ISO 8601
90 and many national standards), then week 1 of 1998 starts on December 29, 1997,
91 and ends on January 4, 1998. If, however, getFirstDayOfWeek() is SUNDAY, then
92 week 1 of 1998 starts on January 4, 1998, and ends on January 10, 1998; the
93 first three days of 1998 then are part of week 53 of 1997.
95 Values calculated for the WEEK_OF_MONTH field range from 0 to 6. Week 1 of a
96 month (the days with WEEK_OF_MONTH = 1) is the earliest set of at least
97 getMinimalDaysInFirstWeek() contiguous days in that month, ending on the day
98 before getFirstDayOfWeek(). Unlike week 1 of a year, week 1 of a month may be
99 shorter than 7 days, need not start on getFirstDayOfWeek(), and will not
100 include days of the previous month. Days of a month before week 1 have a
103 For example, if getFirstDayOfWeek() is SUNDAY and getMinimalDaysInFirstWeek()
104 is 4, then the first week of January 1998 is Sunday, January 4 through
105 Saturday, January 10. These days have a WEEK_OF_MONTH of 1. Thursday, January 1
106 through Saturday, January 3 have a WEEK_OF_MONTH of 0. If
107 getMinimalDaysInFirstWeek() is changed to 3, then January 1 through January 3
108 have a WEEK_OF_MONTH of 1.
110 The clear methods set calendar field(s) undefined. GregorianCalendar uses the
111 following default value for each calendar field if its value is undefined.
147 the first day of week
169 HOUR, HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND
175 Default values are not applicable for the fields not listed above.
181 // get the supported ids for GMT-08:00 (Pacific Standard Time) String[] ids =
182 TimeZone.getAvailableIDs(-8 * 60 * 60 * 1000); // if no ids were returned,
183 something is wrong. get out. if (ids.length == 0) System.exit(0);
185 // begin output System.out.println("Current Time");
187 // create a Pacific Standard Time time zone SimpleTimeZone pdt = new
188 SimpleTimeZone(-8 * 60 * 60 * 1000, ids[0]);
190 // set up rules for daylight savings time pdt.setStartRule(Calendar.APRIL, 1,
191 Calendar.SUNDAY, 2 * 60 * 60 * 1000); pdt.setEndRule(Calendar.OCTOBER, -1,
192 Calendar.SUNDAY, 2 * 60 * 60 * 1000);
194 // create a GregorianCalendar with the Pacific Daylight time zone // and the
195 current date and time Calendar calendar = new GregorianCalendar(pdt); Date
196 trialTime = new Date(); calendar.setTime(trialTime);
198 // print out a bunch of interesting things System.out.println("ERA: " +
199 calendar.get(Calendar.ERA)); System.out.println("YEAR: " +
200 calendar.get(Calendar.YEAR)); System.out.println("MONTH: " +
201 calendar.get(Calendar.MONTH)); System.out.println("WEEK_OF_YEAR: " +
202 calendar.get(Calendar.WEEK_OF_YEAR)); System.out.println("WEEK_OF_MONTH: " +
203 calendar.get(Calendar.WEEK_OF_MONTH)); System.out.println("DATE: " +
204 calendar.get(Calendar.DATE)); System.out.println("DAY_OF_MONTH: " +
205 calendar.get(Calendar.DAY_OF_MONTH)); System.out.println("DAY_OF_YEAR: " +
206 calendar.get(Calendar.DAY_OF_YEAR)); System.out.println("DAY_OF_WEEK: " +
207 calendar.get(Calendar.DAY_OF_WEEK)); System.out.println("DAY_OF_WEEK_IN_MONTH:
208 " + calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH)); System.out.println("AM_PM: "
209 + calendar.get(Calendar.AM_PM)); System.out.println("HOUR: " +
210 calendar.get(Calendar.HOUR)); System.out.println("HOUR_OF_DAY: " +
211 calendar.get(Calendar.HOUR_OF_DAY)); System.out.println("MINUTE: " +
212 calendar.get(Calendar.MINUTE)); System.out.println("SECOND: " +
213 calendar.get(Calendar.SECOND)); System.out.println("MILLISECOND: " +
214 calendar.get(Calendar.MILLISECOND)); System.out.println("ZONE_OFFSET: " +
215 (calendar.get(Calendar.ZONE_OFFSET)/(60*60*1000)));
216 System.out.println("DST_OFFSET: " +
217 (calendar.get(Calendar.DST_OFFSET)/(60*60*1000)));
219 System.out.println("Current Time, with hour reset to 3");
220 calendar.clear(Calendar.HOUR_OF_DAY); // so doesn't override
221 calendar.set(Calendar.HOUR, 3); System.out.println("ERA: " +
222 calendar.get(Calendar.ERA)); System.out.println("YEAR: " +
223 calendar.get(Calendar.YEAR)); System.out.println("MONTH: " +
224 calendar.get(Calendar.MONTH)); System.out.println("WEEK_OF_YEAR: " +
225 calendar.get(Calendar.WEEK_OF_YEAR)); System.out.println("WEEK_OF_MONTH: " +
226 calendar.get(Calendar.WEEK_OF_MONTH)); System.out.println("DATE: " +
227 calendar.get(Calendar.DATE)); System.out.println("DAY_OF_MONTH: " +
228 calendar.get(Calendar.DAY_OF_MONTH)); System.out.println("DAY_OF_YEAR: " +
229 calendar.get(Calendar.DAY_OF_YEAR)); System.out.println("DAY_OF_WEEK: " +
230 calendar.get(Calendar.DAY_OF_WEEK)); System.out.println("DAY_OF_WEEK_IN_MONTH:
231 " + calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH)); System.out.println("AM_PM: "
232 + calendar.get(Calendar.AM_PM)); System.out.println("HOUR: " +
233 calendar.get(Calendar.HOUR)); System.out.println("HOUR_OF_DAY: " +
234 calendar.get(Calendar.HOUR_OF_DAY)); System.out.println("MINUTE: " +
235 calendar.get(Calendar.MINUTE)); System.out.println("SECOND: " +
236 calendar.get(Calendar.SECOND)); System.out.println("MILLISECOND: " +
237 calendar.get(Calendar.MILLISECOND)); System.out.println("ZONE_OFFSET: " +
238 (calendar.get(Calendar.ZONE_OFFSET)/(60*60*1000))); // in hours
239 System.out.println("DST_OFFSET: " +
240 (calendar.get(Calendar.DST_OFFSET)/(60*60*1000))); // in hours
246 *int_java.util.GregorianCalendar.AD*
248 Value of the ERA field indicating the common era (Anno Domini), also known as
249 CE. The sequence of years at the transition from BC to AD is ..., 2 BC, 1 BC, 1
253 *int_java.util.GregorianCalendar.BC*
255 Value of the ERA field indicating the period before the common era (before
256 Christ), also known as BCE. The sequence of years at the transition from BC to
257 AD is ..., 2 BC, 1 BC, 1 AD, 2 AD,...
261 *java.util.GregorianCalendar()*
263 public GregorianCalendar()
265 Constructs a default GregorianCalendar using the current time in the default
266 time zone with the default locale.
269 *java.util.GregorianCalendar(int,int,int)*
271 public GregorianCalendar(
276 Constructs a GregorianCalendar with the given date set in the default time zone
277 with the default locale.
279 year - the value used to set the YEAR calendar field in the calendar.
280 month - the value used to set the MONTH calendar field in the calendar. Month value is
281 0-based. e.g., 0 for January.
282 dayOfMonth - the value used to set the DAY_OF_MONTH calendar field in the calendar.
284 *java.util.GregorianCalendar(int,int,int,int,int)*
286 public GregorianCalendar(
293 Constructs a GregorianCalendar with the given date and time set for the default
294 time zone with the default locale.
296 year - the value used to set the YEAR calendar field in the calendar.
297 month - the value used to set the MONTH calendar field in the calendar. Month value is
298 0-based. e.g., 0 for January.
299 dayOfMonth - the value used to set the DAY_OF_MONTH calendar field in the calendar.
300 hourOfDay - the value used to set the HOUR_OF_DAY calendar field in the calendar.
301 minute - the value used to set the MINUTE calendar field in the calendar.
303 *java.util.GregorianCalendar(int,int,int,int,int,int)*
305 public GregorianCalendar(
313 Constructs a GregorianCalendar with the given date and time set for the default
314 time zone with the default locale.
316 year - the value used to set the YEAR calendar field in the calendar.
317 month - the value used to set the MONTH calendar field in the calendar. Month value is
318 0-based. e.g., 0 for January.
319 dayOfMonth - the value used to set the DAY_OF_MONTH calendar field in the calendar.
320 hourOfDay - the value used to set the HOUR_OF_DAY calendar field in the calendar.
321 minute - the value used to set the MINUTE calendar field in the calendar.
322 second - the value used to set the SECOND calendar field in the calendar.
324 *java.util.GregorianCalendar(Locale)*
326 public GregorianCalendar(java.util.Locale aLocale)
328 Constructs a GregorianCalendar based on the current time in the default time
329 zone with the given locale.
331 aLocale - the given locale.
333 *java.util.GregorianCalendar(TimeZone)*
335 public GregorianCalendar(java.util.TimeZone zone)
337 Constructs a GregorianCalendar based on the current time in the given time zone
338 with the default locale.
340 zone - the given time zone.
342 *java.util.GregorianCalendar(TimeZone,Locale)*
344 public GregorianCalendar(
345 java.util.TimeZone zone,
346 java.util.Locale aLocale)
348 Constructs a GregorianCalendar based on the current time in the given time zone
349 with the given locale.
351 zone - the given time zone.
352 aLocale - the given locale.
354 *java.util.GregorianCalendar.add(int,int)*
360 Adds the specified (signed) amount of time to the given calendar field, based
361 on the calendar's rules.
363 Add rule 1. The value of field after the call minus the value of field before
364 the call is amount, modulo any overflow that has occurred in field. Overflow
365 occurs when a field value exceeds its range and, as a result, the next larger
366 field is incremented or decremented and the field value is adjusted back into
369 Add rule 2. If a smaller field is expected to be invariant, but it is
370 impossible for it to be equal to its prior value because of changes in its
371 minimum or maximum after field is changed, then its value is adjusted to be as
372 close as possible to its expected value. A smaller field represents a smaller
373 unit of time. HOUR is a smaller field than DAY_OF_MONTH. No adjustment is made
374 to smaller fields that are not expected to be invariant. The calendar system
375 determines what fields are expected to be invariant.
378 field - the calendar field.
379 amount - the amount of date or time to be added to the field.
381 *java.util.GregorianCalendar.clone()*
383 public |java.lang.Object| clone()
389 *java.util.GregorianCalendar.computeFields()*
391 protected void computeFields()
393 Converts the time value (millisecond offset from the Epoch) to calendar field
394 values. The time is not recomputed first; to recompute the time, then the
395 fields, call the complete method.
399 *java.util.GregorianCalendar.computeTime()*
401 protected void computeTime()
403 Converts calendar field values to the time value (millisecond offset from the
408 *java.util.GregorianCalendar.equals(Object)*
410 public boolean equals(java.lang.Object obj)
412 Compares this GregorianCalendar to the specified Object. The result is true if
413 and only if the argument is a GregorianCalendar object that represents the same
414 time value (millisecond offset from the Epoch) under the same Calendar
415 parameters and Gregorian change date as this object.
418 obj - the object to compare with.
420 Returns: true if this object is equal to obj; false otherwise.
422 *java.util.GregorianCalendar.getActualMaximum(int)*
424 public int getActualMaximum(int field)
426 Returns the maximum value that this calendar field could have, taking into
427 consideration the given time value and the current values of the
428 getFirstDayOfWeek(|java.util.Calendar|) ,
429 getMinimalDaysInFirstWeek(|java.util.Calendar|) ,
430 getGregorianChange(|java.util.GregorianCalendar|) and
431 getTimeZone(|java.util.Calendar|) methods. For example, if the date of this
432 instance is February 1, 2004, the actual maximum value of the DAY_OF_MONTH
433 field is 29 because 2004 is a leap year, and if the date of this instance is
434 February 1, 2005, it's 28.
437 field - the calendar field
439 Returns: the maximum of the given field for the time value of this GregorianCalendar
441 *java.util.GregorianCalendar.getActualMinimum(int)*
443 public int getActualMinimum(int field)
445 Returns the minimum value that this calendar field could have, taking into
446 consideration the given time value and the current values of the
447 getFirstDayOfWeek(|java.util.Calendar|) ,
448 getMinimalDaysInFirstWeek(|java.util.Calendar|) ,
449 getGregorianChange(|java.util.GregorianCalendar|) and
450 getTimeZone(|java.util.Calendar|) methods.
452 For example, if the Gregorian change date is January 10, 1970 and the date of
453 this GregorianCalendar is January 20, 1970, the actual minimum value of the
454 DAY_OF_MONTH field is 10 because the previous date of January 10, 1970 is
455 December 27, 1996 (in the Julian calendar). Therefore, December 28, 1969 to
456 January 9, 1970 don't exist.
459 field - the calendar field
461 Returns: the minimum of the given field for the time value of this GregorianCalendar
463 *java.util.GregorianCalendar.getGreatestMinimum(int)*
465 public int getGreatestMinimum(int field)
467 Returns the highest minimum value for the given calendar field of this
468 GregorianCalendar instance. The highest minimum value is defined as the largest
469 value returned by (|java.util.GregorianCalendar|) for any possible time value,
470 taking into consideration the current values of the
471 getFirstDayOfWeek(|java.util.Calendar|) ,
472 getMinimalDaysInFirstWeek(|java.util.Calendar|) ,
473 getGregorianChange(|java.util.GregorianCalendar|) and
474 getTimeZone(|java.util.Calendar|) methods.
477 field - the calendar field.
479 Returns: the highest minimum value for the given calendar field.
481 *java.util.GregorianCalendar.getGregorianChange()*
483 public final |java.util.Date| getGregorianChange()
485 Gets the Gregorian Calendar change date. This is the point when the switch from
486 Julian dates to Gregorian dates occurred. Default is October 15, 1582
487 (Gregorian). Previous to this, dates will be in the Julian calendar.
491 Returns: the Gregorian cutover date for this GregorianCalendar object.
493 *java.util.GregorianCalendar.getLeastMaximum(int)*
495 public int getLeastMaximum(int field)
497 Returns the lowest maximum value for the given calendar field of this
498 GregorianCalendar instance. The lowest maximum value is defined as the smallest
499 value returned by (|java.util.GregorianCalendar|) for any possible time value,
500 taking into consideration the current values of the
501 getFirstDayOfWeek(|java.util.Calendar|) ,
502 getMinimalDaysInFirstWeek(|java.util.Calendar|) ,
503 getGregorianChange(|java.util.GregorianCalendar|) and
504 getTimeZone(|java.util.Calendar|) methods.
507 field - the calendar field
509 Returns: the lowest maximum value for the given calendar field.
511 *java.util.GregorianCalendar.getMaximum(int)*
513 public int getMaximum(int field)
515 Returns the maximum value for the given calendar field of this
516 GregorianCalendar instance. The maximum value is defined as the largest value
517 returned by the get(|java.util.Calendar|) method for any possible time value,
518 taking into consideration the current values of the
519 getFirstDayOfWeek(|java.util.Calendar|) ,
520 getMinimalDaysInFirstWeek(|java.util.Calendar|) ,
521 getGregorianChange(|java.util.GregorianCalendar|) and
522 getTimeZone(|java.util.Calendar|) methods.
525 field - the calendar field.
527 Returns: the maximum value for the given calendar field.
529 *java.util.GregorianCalendar.getMinimum(int)*
531 public int getMinimum(int field)
533 Returns the minimum value for the given calendar field of this
534 GregorianCalendar instance. The minimum value is defined as the smallest value
535 returned by the get(|java.util.Calendar|) method for any possible time value,
536 taking into consideration the current values of the
537 getFirstDayOfWeek(|java.util.Calendar|) ,
538 getMinimalDaysInFirstWeek(|java.util.Calendar|) ,
539 getGregorianChange(|java.util.GregorianCalendar|) and
540 getTimeZone(|java.util.Calendar|) methods.
543 field - the calendar field.
545 Returns: the minimum value for the given calendar field.
547 *java.util.GregorianCalendar.getTimeZone()*
549 public |java.util.TimeZone| getTimeZone()
555 *java.util.GregorianCalendar.hashCode()*
557 public int hashCode()
559 Generates the hash code for this GregorianCalendar object.
563 *java.util.GregorianCalendar.isLeapYear(int)*
565 public boolean isLeapYear(int year)
567 Determines if the given year is a leap year. Returns true if the given year is
568 a leap year. To specify BC year numbers, 1 - year number must be given. For
569 example, year BC 4 is specified as -3.
572 year - the given year.
574 Returns: true if the given year is a leap year; false otherwise.
576 *java.util.GregorianCalendar.roll(int,boolean)*
582 Adds or subtracts (up/down) a single unit of time on the given time field
583 without changing larger fields.
585 Example: Consider a GregorianCalendar originally set to December 31, 1999.
586 Calling roll(Calendar.MONTH, true)(|java.util.GregorianCalendar|) sets the
587 calendar to January 31, 1999. The YEAR field is unchanged because it is a
588 larger field than MONTH.
591 up - indicates if the value of the specified calendar field is to be rolled up or
592 rolled down. Use true if rolling up, false otherwise.
594 *java.util.GregorianCalendar.roll(int,int)*
600 Adds a signed amount to the specified calendar field without changing larger
601 fields. A negative roll amount means to subtract from field without changing
602 larger fields. If the specified amount is 0, this method performs nothing.
604 This method calls (|java.util.GregorianCalendar|) before adding the amount so
605 that all the calendar fields are normalized. If there is any calendar field
606 having an out-of-range value in non-lenient mode, then an
607 IllegalArgumentException is thrown.
609 Example: Consider a GregorianCalendar originally set to August 31, 1999.
610 Calling roll(Calendar.MONTH, 8) sets the calendar to April 30, 1999. Using a
611 GregorianCalendar, the DAY_OF_MONTH field cannot be 31 in the month April.
612 DAY_OF_MONTH is set to the closest possible value, 30. The YEAR field maintains
613 the value of 1999 because it is a larger field than MONTH.
615 Example: Consider a GregorianCalendar originally set to Sunday June 6, 1999.
616 Calling roll(Calendar.WEEK_OF_MONTH, -1) sets the calendar to Tuesday June 1,
617 1999, whereas calling add(Calendar.WEEK_OF_MONTH, -1) sets the calendar to
618 Sunday May 30, 1999. This is because the roll rule imposes an additional
619 constraint: The MONTH must not change when the WEEK_OF_MONTH is rolled. Taken
620 together with add rule 1, the resultant date must be between Tuesday June 1 and
621 Saturday June 5. According to add rule 2, the DAY_OF_WEEK, an invariant when
622 changing the WEEK_OF_MONTH, is set to Tuesday, the closest possible value to
623 Sunday (where Sunday is the first day of the week).
626 field - the calendar field.
627 amount - the signed amount to add to field.
629 *java.util.GregorianCalendar.setGregorianChange(Date)*
631 public void setGregorianChange(java.util.Date date)
633 Sets the GregorianCalendar change date. This is the point when the switch from
634 Julian dates to Gregorian dates occurred. Default is October 15, 1582
635 (Gregorian). Previous to this, dates will be in the Julian calendar.
637 To obtain a pure Julian calendar, set the change date to Date(Long.MAX_VALUE).
638 To obtain a pure Gregorian calendar, set the change date to
639 Date(Long.MIN_VALUE).
642 date - the given Gregorian cutover date.
644 *java.util.GregorianCalendar.setTimeZone(TimeZone)*
646 public void setTimeZone(java.util.TimeZone zone)