+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
- * Copyright (C) 2003-2004, International Business Machines Corporation
+ ********************************************************************************
+ * Copyright (C) 2003-2013, International Business Machines Corporation
* and others. All Rights Reserved.
********************************************************************************
*
* <p>
* @internal
*/
-class U_I18N_API BuddhistCalendar : public GregorianCalendar {
+class BuddhistCalendar : public GregorianCalendar {
public:
/**
* @return The class ID for all objects of this class.
* @internal
*/
- static UClassID U_EXPORT2 getStaticClassID(void);
+ U_I18N_API static UClassID U_EXPORT2 getStaticClassID(void);
/**
* return the calendar type, "buddhist".
*/
virtual const char * getType() const;
- /**
- * (Overrides Calendar) UDate Arithmetic function. Adds the specified (signed) amount
- * of time to the given time field, based on the calendar's rules. For more
- * information, see the documentation for Calendar::add().
- *
- * @param field The time field.
- * @param amount The amount of date or time to be added to the field.
- * @param status Output param set to success/failure code on exit. If any value
- * previously set in the time field is invalid, this will be set to
- * an error status.
- * @draft ICU 2.6
- */
- virtual void add(UCalendarDateFields field, int32_t amount, UErrorCode& status);
-
- /**
- * Gets the maximum value for the given time field. e.g. for DAY_OF_MONTH,
- * 31.
- *
- * @param field The given time field.
- * @return The maximum value for the given time field.
- * @draft ICU 2.6
- */
- int32_t getMaximum(UCalendarDateFields field) const;
-
- /**
- * Gets the lowest maximum value for the given field if varies. Otherwise same as
- * getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.
- *
- * @param field The given time field.
- * @return The lowest maximum value for the given time field.
- * @draft ICU 2.6
- */
- int32_t getLeastMaximum(UCalendarDateFields field) const;
-
- /**
- * @deprecated ICU 2.6 use UCalendarDateFields instead of EDateFields
- */
- inline virtual int32_t getMaximum(EDateFields field) const { return getMaximum((UCalendarDateFields)field); }
- /**
- * @deprecated ICU 2.6 use UCalendarDateFields instead of EDateFields
- */
- inline virtual int32_t getLeastMaximum(EDateFields field) const { return getLeastMaximum((UCalendarDateFields)field); }
- /**
- * @deprecated ICU 2.6 use UCalendarDateFields instead of EDateFields
- */
- inline virtual void add(EDateFields field, int32_t amount, UErrorCode& status) { add((UCalendarDateFields)field, amount, status); }
-
private:
BuddhistCalendar(); // default constructor not implemented
virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month,
UBool useMonth) const;
- /**
- * month length of current month
- * @internal
- */
- virtual int32_t monthLength(int32_t month) const;
- /**
- * month length of month
- * @internal
- */
- virtual int32_t monthLength(int32_t month, int32_t year) const;
-
- /**
- * month length of current month
- * @internal
- */
- int32_t getGregorianYear(UErrorCode& status) const;
-
- /**
- * Calculate the era for internal computation
- * @internal
- */
- virtual int32_t internalGetEra() const;
-
/**
* Returns TRUE because the Buddhist Calendar does have a default century
* @internal
* @internal
*/
virtual int32_t defaultCenturyStartYear() const;
-
- private: // default century stuff.
- /**
- * The system maintains a static default century start date. This is initialized
- * the first time it is used. Before then, it is set to SYSTEM_DEFAULT_CENTURY to
- * indicate an uninitialized state. Once the system default century date and year
- * are set, they do not change.
- */
- static UDate fgSystemDefaultCenturyStart;
-
- /**
- * See documentation for systemDefaultCenturyStart.
- */
- static int32_t fgSystemDefaultCenturyStartYear;
-
- /**
- * Default value that indicates the defaultCenturyStartYear is unitialized
- */
- static const int32_t fgSystemDefaultCenturyYear;
-
- /**
- * start of default century, as a date
- */
- static const UDate fgSystemDefaultCentury;
-
- /**
- * Returns the beginning date of the 100-year window that dates
- * with 2-digit years are considered to fall within.
- */
- UDate internalGetDefaultCenturyStart(void) const;
-
- /**
- * Returns the first year of the 100-year window that dates with
- * 2-digit years are considered to fall within.
- */
- int32_t internalGetDefaultCenturyStartYear(void) const;
-
- /**
- * Initializes the 100-year window that dates with 2-digit years
- * are considered to fall within so that its start date is 80 years
- * before the current time.
- */
- static void initializeSystemDefaultCentury(void);
};
U_NAMESPACE_END