2362N/A * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * The <code>CalendarDate</code> class represents a specific instant 0N/A * in time by calendar date and time fields that are multiple cycles 0N/A * in different time unites. The semantics of each calendar field is 0N/A * given by a concrete calendar system rather than this 0N/A * <code>CalendarDate</code> class that holds calendar field values 0N/A * without interpreting them. Therefore, this class can be used to 0N/A * represent an amount of time, such as 2 years and 3 months. 0N/A * <p>A <code>CalendarDate</code> instance can be created by calling 0N/A * the <code>newCalendarDate</code> or <code>getCalendarDate</code> 0N/A * methods in <code>CalendarSystem</code>. A 0N/A * <code>CalendarSystem</code> instance is obtained by calling one of 0N/A * the factory methods in <code>CalendarSystem</code>. Manipulations 0N/A * of calendar dates must be handled by the calendar system by which 0N/A * <code>CalendarDate</code> instances have been created. 0N/A * <p>Some calendar fields can be modified through method calls. Any 0N/A * modification of a calendar field brings the state of a 0N/A * <code>CalendarDate</code> to <I>not normalized</I>. The 0N/A * normalization must be performed to make all the calendar fields 0N/A * consistent with a calendar system. 0N/A * <p>The <code>protected</code> methods are intended to be used for 0N/A * implementing a concrete calendar system, not for general use as an 0N/A * @see CalendarSystem 0N/A * @author Masayoshi Okutsu 0N/A private int millis;
// fractional part of the second 0N/A private long fraction;
// time of day value in millisecond 0N/A * Sets the era of the date to the specified era. The default 0N/A * implementation of this method accepts any Era value, including 0N/A * <code>null</code>. 0N/A * @exception NullPointerException if the calendar system for this 0N/A * <code>CalendarDate</code> requires eras and the specified era 0N/A * @exception IllegalArgumentException if the specified 0N/A * <code>era</code> is unknown to the calendar 0N/A * system for this <code>CalendarDate</code>. 0N/A * Returns whether the year represented by this 0N/A * <code>CalendarDate</code> is a leap year. If leap years are 0N/A * not applicable to the calendar system, this method always 0N/A * returns <code>false</code>. 0N/A * <p>If this <code>CalendarDate</code> hasn't been normalized, 0N/A * <code>false</code> is returned. The normalization must be 0N/A * performed to retrieve the correct leap year information. 0N/A * @return <code>true</code> if this <code>CalendarDate</code> is 0N/A * normalized and the year of this <code>CalendarDate</code> is a 0N/A * leap year, or <code>false</code> otherwise. 0N/A * @see BaseCalendar#isGregorianLeapYear 0N/A * Returns the day of week value. If this CalendarDate is not 0N/A * normalized, {@link #FIELD_UNDEFINED} is returned. 0N/A * @return day of week or {@link #FIELD_UNDEFINED} 0N/A * Returns whether the specified date is the same date of this 0N/A * <code>CalendarDate</code>. The time of the day fields are 0N/A * ignored for the comparison. 0N/A // a pseudo (local standard) time stamp value in milliseconds 0N/A // from the Epoch, assuming Gregorian calendar fields. 0N/A * Returns a copy of this <code>CalendarDate</code>. The 0N/A * <code>TimeZone</code> object, if any, is not cloned. 0N/A * @return a copy of this <code>CalendarDate</code> 0N/A // this shouldn't happen 0N/A * Converts calendar date values to a <code>String</code> in the 0N/A * yyyy-MM-dd'T'HH:mm:ss.SSSz 0N/A * @see java.text.SimpleDateFormat