29 #if !UCONFIG_NO_FORMATTING
323 UDate getGregorianChange(
void)
const;
340 UBool isLeapYear(int32_t year)
const;
362 virtual void roll(EDateFields field, int32_t amount,
UErrorCode& status);
377 #ifndef U_HIDE_DEPRECATED_API
408 #ifndef U_HIDE_DEPRECATED_API
469 static UClassID U_EXPORT2 getStaticClassID(
void);
482 virtual const char *
getType()
const;
494 virtual int32_t internalGetEra()
const;
510 UBool useMonth)
const;
546 virtual int32_t monthLength(int32_t month)
const;
555 virtual int32_t monthLength(int32_t month, int32_t year)
const;
557 #ifndef U_HIDE_INTERNAL_API
564 int32_t yearLength(int32_t year)
const;
571 int32_t yearLength(
void)
const;
580 void pinDayOfMonth(
void);
661 static double computeJulianDayOfYear(
UBool isGregorian, int32_t year,
668 UBool validateFields(
void)
const;
684 int32_t aggregateStamp(int32_t stamp_a, int32_t stamp_b);
694 UDate fGregorianCutover;
699 int32_t fCutoverJulianDay;
706 UDate fNormalizedGregorianCutover;
712 int32_t fGregorianCutoverYear;
718 int32_t fGregorianCutoverJulianDay;
727 static double millisToJulianDay(
UDate millis);
736 static UDate julianDayToMillis(
double julian);
749 UBool fInvertGregorian;
779 static UDate fgSystemDefaultCenturyStart;
784 static int32_t fgSystemDefaultCenturyStartYear;
789 static const int32_t fgSystemDefaultCenturyYear;
794 static const UDate fgSystemDefaultCentury;
802 UDate internalGetDefaultCenturyStart(
void)
const;
810 int32_t internalGetDefaultCenturyStartYear(
void)
const;
816 static void initializeSystemDefaultCentury(
void);
virtual int32_t handleGetMonthLength(int32_t extendedYear, int32_t month) const
Return the number of days in the given month of the given extended year of this calendar system...
UCalendarDateFields
Possible fields in a UCalendar.
virtual int32_t defaultCenturyStartYear() const =0
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...
Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...
double UDate
Date and Time data type.
virtual UClassID getDynamicClassID(void) const =0
Returns a unique class ID POLYMORPHICALLY.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
int32_t getActualMaximum(EDateFields field, UErrorCode &status) const
Return the maximum value that this field could have, given the current date.
virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, UBool useMonth) const =0
Return the Julian day number of day before the first day of the given month in the given extended yea...
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...
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
virtual Calendar * clone(void) const =0
Create and return a polymorphic copy of this calendar.
C++ API: Calendar object.
virtual UBool haveDefaultCentury() const =0
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.
void roll(EDateFields field, UBool up, UErrorCode &status)
Time Field Rolling function.
virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField)
Subclasses may override this.
virtual UBool inDaylightTime(UErrorCode &status) const =0
Queries if the current date for this Calendar is in Daylight Savings Time.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Calendar & operator=(const Calendar &right)
Default assignment operator.
Concrete class which provides the standard calendar used by most of the world.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Basic definitions for ICU, for both C and C++ APIs.
virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t woy)
Subclasses must override this to convert from week fields (YEAR_WOY and WEEK_OF_YEAR) to an extended ...
virtual UDate defaultCenturyStart() const =0
virtual int32_t handleGetExtendedYear()=0
Return the extended year defined by the current fields.
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 Locale object represents a specific geographical, political, or cultural region.