31 #if U_SHOW_CPLUSPLUS_API
33 #if !UCONFIG_NO_FORMATTING
327 UDate getGregorianChange()
const;
344 UBool isLeapYear(int32_t year)
const;
355 #ifndef U_FORCE_HIDE_DEPRECATED_API
367 virtual void roll(EDateFields field, int32_t amount,
UErrorCode& status)
override;
368 #endif // U_FORCE_HIDE_DEPRECATED_API
383 #ifndef U_HIDE_DEPRECATED_API
451 static UClassID U_EXPORT2 getStaticClassID();
463 virtual const char *
getType()
const override;
475 virtual int32_t internalGetEra()
const;
530 virtual int32_t monthLength(int32_t month,
UErrorCode& status)
const;
539 virtual int32_t monthLength(int32_t month, int32_t year)
const;
541 #ifndef U_HIDE_INTERNAL_API
547 int32_t yearLength()
const;
622 #ifndef U_HIDE_INTERNAL_API
629 #endif // U_HIDE_INTERNAL_API
639 static double computeJulianDayOfYear(
UBool isGregorian, int32_t year,
646 UBool validateFields()
const;
662 int32_t aggregateStamp(int32_t stamp_a, int32_t stamp_b);
671 UDate fGregorianCutover;
676 int32_t fCutoverJulianDay;
683 UDate fNormalizedGregorianCutover;
689 int32_t fGregorianCutoverYear;
698 static double millisToJulianDay(
UDate millis);
707 static UDate julianDayToMillis(
double julian);
720 UBool fInvertGregorian;
UCalendarDateFields
Possible fields in a UCalendar.
#define DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY
Macro for the class to declare it override haveDefaultCentury, defaultCenturyStart, and defaultCenturyStartYear functions in this class.
EEras
Useful constants for GregorianCalendar and TimeZone.
virtual void handleComputeFields(int32_t julianDay, UErrorCode &status)
Subclasses may override this method to compute several fields specific to each calendar system...
virtual Calendar * clone() const =0
Create and return a polymorphic copy of this calendar.
Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...
virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField, UErrorCode &status)
Subclasses may override this.
double UDate
Date and Time data type.
virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month, UErrorCode &status) const
Return the number of days in the given month of the given extended year of this calendar system...
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
TimeZone represents a time zone offset, and also figures out daylight savings.
virtual UBool isEquivalentTo(const Calendar &other) const
Returns true if the given Calendar object is equivalent to this one.
virtual int32_t handleGetYearLength(int32_t eyear) const
Return the number of days in the given extended year of this calendar system.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
virtual int32_t handleGetExtendedYear(UErrorCode &status)=0
Return the extended year defined by the current fields.
virtual UClassID getDynamicClassID() const override=0
Returns a unique class ID POLYMORPHICALLY.
C++ API: Calendar object.
virtual const char * getType() const =0
Returns the calendar type name string for this Calendar object.
int32_t getActualMinimum(EDateFields field, UErrorCode &status) const
Return the minimum value that this field could have, given the current date.
virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode &status) const
Return the maximum value that this field could have, given the current date.
void roll(EDateFields field, UBool up, UErrorCode &status)
Time Field Rolling function.
virtual bool isEra0CountingBackward() const override
The year in this calendar is counting from 1 backward if the era is 0.
Calendar & operator=(const Calendar &right)
Default assignment operator.
Concrete class which provides the standard calendar used by most of the world.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy, UErrorCode &status)
Subclasses must override this to convert from week fields (YEAR_WOY and WEEK_OF_YEAR) to an extended ...
Basic definitions for ICU, for both C and C++ APIs.
virtual int64_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth, UErrorCode &status) const =0
Return the Julian day number of day before the first day of the given month in the given extended yea...
virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const =0
Subclass API for defining limits of different types.
int8_t UBool
The ICU boolean type, a signed-byte integer.
A Locale object represents a specific geographical, political, or cultural region.