/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
*
* @author Masayoshi Okutsu
* @since 1.6
*/
protected Date() {
super();
}
super(zone);
}
}
return this;
}
return this;
}
}
return this;
}
public int getNormalizedYear() {
return gregorianYear;
}
this.gregorianYear = normalizedYear;
}
}
}
}
}
}
}
try {
+ "calendars.properties";
}
return props;
}
});
} catch (PrivilegedActionException e) {
throw new RuntimeException(e.getException());
}
// Parse calendar.*.eras
return null;
}
while (eraTokens.hasMoreTokens()) {
boolean localTime = true;
long since = 0;
while (itemTokens.hasMoreTokens()) {
// it must be in the key=value form.
if (index == -1) {
return null;
}
localTime = false;
} else {
}
} else {
}
}
}
}
}
return name;
}
}
}
}
}
int i;
if (era.isLocalTime()) {
since -= zoneOffset;
}
ldate.setLocalYear(y);
break;
}
}
if (i < 0) {
}
ldate.setNormalized(true);
return ldate;
}
return new Date();
}
}
if (!validateEra(era)) {
return false;
}
} else {
}
}
// Validate the era
return true;
}
}
return false;
}
if (date.isNormalized()) {
return true;
}
// Normalize it as a Gregorian date and get its millisecond value
boolean hasMillis = false;
long millis = 0;
int i;
if (era.isLocalTime()) {
break;
}
if (month > sinceMonth) {
break;
}
if (month == sinceMonth) {
break;
}
if (timeOfDay >= sinceTimeOfDay) {
break;
}
--i;
break;
}
}
}
} else {
if (!hasMillis) {
hasMillis = true;
}
break;
}
}
}
if (i >= 0) {
ldate.setLocalYear(y);
} else {
// Set Gregorian year with no era
}
ldate.setNormalized(true);
return true;
}
super.normalizeMonth(date);
}
// Set the supposed-to-be-correct Gregorian year first
// e.g., Showa 90 becomes 2015 (1926 + 90 - 1).
} else {
}
}
/**
* Returns whether the specified Gregorian year is a leap year.
* @see #isLeapYear(Era, int)
*/
}
return isLeapYear(year);
}
return isLeapYear(gyear);
}
}
}