BuddhistCalendar.java revision 3261
3261N/A * Copyright (c) 2000, 2010, 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 * Constructs a default BuddhistCalendar using the current time 0N/A * in the default time zone with the default locale. 0N/A * Constructs a BuddhistCalendar based on the current time 0N/A * in the given time zone with the default locale. 0N/A * @param zone the given time zone. 0N/A * Constructs a BuddhistCalendar based on the current time 0N/A * in the default time zone with the given locale. 0N/A * @param aLocale the given locale. 0N/A * Constructs a BuddhistCalendar based on the current time 0N/A * in the given time zone with the given locale. 0N/A * @param zone the given time zone. 0N/A * @param aLocale the given locale. 0N/A * Compares this BuddhistCalendar to an object reference. 0N/A * @param obj the object reference with which to compare 0N/A * @return true if this object is equal to <code>obj</code>; false otherwise 0N/A * Override hashCode. 0N/A * Generates the hash code for the BuddhistCalendar object 0N/A * Gets the value for a given time field. 0N/A * @param field the given time field. 0N/A * @return the value for the given time field. 0N/A * Sets the time field with the given value. 0N/A * @param field the given time field. 0N/A * @param value the value to be set for the given time field. 0N/A * Adds the specified (signed) amount of time to the given time field. 0N/A * @param field the time field. 0N/A * @param amount the amount of date or time to be added to the field. 3189N/A // To let the superclass calculate date-time values correctly, 3189N/A // temporarily make this GregorianCalendar. 0N/A * Add to field a signed amount without changing larger fields. 0N/A * A negative roll amount means to subtract from field without changing 0N/A * @param field the time field. 0N/A * @param amount the signed amount to add to <code>field</code>. 3189N/A // To let the superclass calculate date-time values correctly, 3189N/A // temporarily make this GregorianCalendar. 0N/A // Handle Thai BuddhistCalendar specific era names 0N/A // Handle Thai BuddhistCalendar specific era names 0N/A * Returns the maximum value that this field could have, given the 0N/A * current date. For example, with the date "Feb 3, 2540" and the 0N/A * <code>DAY_OF_MONTH</code> field, the actual maximum is 28; for 0N/A * "Feb 3, 2539" it is 29. 0N/A * @param field the field to determine the maximum of 0N/A * @return the maximum of the given field for the current date of this Calendar 3189N/A // To let the superclass calculate date-time values correctly, 3189N/A // temporarily make this GregorianCalendar. 0N/A // The super class produces a String with the Gregorian year 0N/A // If the YEAR field is UNSET, then return the Gregorian string. 0N/A // If the string doesn't include the year value for some 0N/A // reason, then return the Gregorian string. 0N/A // Skip the year number