34 #if !UCONFIG_NO_FORMATTING
44 class ICUServiceFactory;
175 #ifndef U_HIDE_DEPRECATED_API
184 DAY_OF_WEEK_IN_MONTH,
212 #ifndef U_HIDE_DEPRECATED_API
228 #ifndef U_HIDE_DEPRECATED_API
250 #ifndef U_HIDE_DEPRECATED_API
268 virtual Calendar* clone(
void)
const = 0;
757 void adoptTimeZone(
TimeZone* value);
766 void setTimeZone(
const TimeZone& zone);
776 const TimeZone& getTimeZone(
void)
const;
810 void setLenient(
UBool lenient);
818 UBool isLenient(
void)
const;
826 void setFirstDayOfWeek(EDaysOfWeek value);
842 EDaysOfWeek getFirstDayOfWeek(
void)
const;
862 void setMinimalDaysInFirstWeek(
uint8_t value);
873 uint8_t getMinimalDaysInFirstWeek(
void)
const;
883 virtual int32_t getMinimum(EDateFields field)
const;
903 virtual int32_t getMaximum(EDateFields field)
const;
923 virtual int32_t getGreatestMinimum(EDateFields field)
const;
943 virtual int32_t getLeastMaximum(EDateFields field)
const;
1061 UBool isSet(EDateFields field)
const;
1080 void set(EDateFields field,
int32_t value);
1148 void clear(EDateFields field);
1185 virtual const char * getType()
const = 0;
1246 virtual void computeTime(
UErrorCode& status);
1259 virtual void computeFields(
UErrorCode& status);
1270 double getTimeInMillis(
UErrorCode& status)
const;
1280 void setTimeInMillis(
double millis,
UErrorCode& status );
1334 void internalSet(EDateFields field,
int32_t value);
1360 UCAL_LIMIT_MINIMUM = 0,
1361 UCAL_LIMIT_GREATEST_MINIMUM,
1362 UCAL_LIMIT_LEAST_MAXIMUM,
1414 UBool useMonth)
const = 0;
1443 virtual int32_t handleGetExtendedYear() = 0;
1705 return fGregorianYear;
1714 return fGregorianMonth;
1723 return fGregorianDayOfYear;
1732 return fGregorianDayOfMonth;
1905 uint8_t fMinimalDaysInFirstWeek;
1917 void setWeekCountData(
const Locale& desiredLocale,
const char *type,
UErrorCode& success);
2044 static uint8_t julianDayToDayOfWeek(
double julian);
2051 #if !UCONFIG_NO_SERVICE
2090 friend class CalendarFactory;
2096 friend class CalendarService;
2102 friend class DefaultCalendarFactory;
2109 virtual UBool haveDefaultCentury()
const = 0;
2115 virtual UDate defaultCenturyStart()
const = 0;
2120 virtual int32_t defaultCenturyStartYear()
const = 0;
2175 fStamp[field] = kInternallySet;
2181 return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek);
int32_t getGregorianYear() const
Return the extended year on the Gregorian calendar as computed by computeGregorianFields().
void roll(EDateFields field, UBool up, UErrorCode &status)
Time Field Rolling function.
UCalendarDateFields
Possible fields in a UCalendar.
Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...
UBool fIsTimeSet
The flag which indicates if the current time is set in the calendar.
void internalSetTime(UDate time)
Set the current time without affecting flags or fields.
int32_t internalGet(EDateFields field) const
Gets the value for a given time field.
EAmpm
Useful constants for hour in 12-hour clock.
C++ API: TimeZone object.
double UDate
Date and Time data type.
UBool fIsSet[UCAL_FIELD_COUNT]
The flags which tell if a specified time field for the calendar is set.
int32_t getGregorianDayOfYear() const
Return the day of year (1-based) on the Gregorian calendar as computed by computeGregorianFields().
int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t dayOfWeek)
Return the week number of a day, within a period.
int32_t getGregorianDayOfMonth() const
Return the day of month (1-based) on the Gregorian calendar as computed by computeGregorianFields().
#define ULOC_FULLNAME_CAPACITY
Useful constant for the maximum size of the whole locale ID (including the terminating NULL and all k...
void internalSet(EDateFields field, int32_t value)
Sets the value for a given time field.
void setTime(UDate date, UErrorCode &status)
Sets this Calendar's current time with the given UDate.
unsigned char uint8_t
Define 64 bit limits.
EDateFields
Field IDs for date and time.
#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.
UCalendarDaysOfWeek
Useful constant for days of week.
EDaysOfWeek
Useful constant for days of week.
UBool fAreFieldsVirtuallySet
True if all fields have been virtually set, but have not yet been computed.
UDate internalGetTime(void) const
Get the current time without recomputing.
UBool fAreAllFieldsSet
True if all of the fields have been set.
#define TRUE
The TRUE value of a UBool.
int32_t fStamp[UCAL_FIELD_COUNT]
Pseudo-time-stamps which specify when each field was set.
int32_t internalGet(UCalendarDateFields field) const
Gets the value for a given time field.
C++ API: Common ICU base class UObject.
const void * URegistryKey
Opaque type returned by registerInstance, registerFactory and unregister for service registration...
int32_t internalGet(UCalendarDateFields field, int32_t defaultValue) const
Gets the value for a given time field.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API If the compiler doesn't support namespaces...
UObject is the common ICU "boilerplate" class.
static const Locale & getDefault(void)
Common methods of getting the current default Locale.
void * UClassID
UClassID is used to identify classes without using RTTI, since RTTI is not yet supported by all C++ c...
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
TimeZone represents a time zone offset, and also figures out daylight savings.
Base class for 'pure' C++ implementations of uenum api.
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
C++ API: Locale ID object.
static Calendar * createInstance(UErrorCode &success)
Creates a Calendar using the default timezone and locale.
UBool fAreFieldsSet
True if the fields are in sync with the currently set time of this Calendar.
Basic definitions for ICU, for both C and C++ APIs.
UDate getTime(UErrorCode &status) const
Gets this Calendar's time as milliseconds.
int32_t fFields[UCAL_FIELD_COUNT]
The time fields containing values into which the millis is computed.
UBool operator!=(const Calendar &that) const
Compares the inequality of two Calendar objects.
EMonths
Useful constants for month.
A Locale object represents a specific geographical, political, or cultural region.
virtual UClassID getDynamicClassID() const =0
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
int32_t getGregorianMonth() const
Return the month (0-based) on the Gregorian calendar as computed by computeGregorianFields().
int32_t UFieldResolutionTable[12][8]
signed int int32_t
Define 64 bit limits.
int8_t UBool
The ICU boolean type.