Loading...
Searching...
No Matches
calendar.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
********************************************************************************
* Copyright (C) 1997-2014, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
* File CALENDAR.H
*
* Modification History:
*
* Date Name Description
* 04/22/97 aliu Expanded and corrected comments and other header
* contents.
* 05/01/97 aliu Made equals(), before(), after() arguments const.
* 05/20/97 aliu Replaced fAreFieldsSet with fAreFieldsInSync and
* fAreAllFieldsSet.
* 07/27/98 stephen Sync up with JDK 1.2
* 11/15/99 weiv added YEAR_WOY and DOW_LOCAL
* to EDateFields
* 8/19/2002 srl Removed Javaisms
* 11/07/2003 srl Update, clean up documentation.
********************************************************************************
*/
#ifndef CALENDAR_H
#define CALENDAR_H
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
#include "unicode/uobject.h"
#include "unicode/locid.h"
#include "unicode/timezone.h"
#include "unicode/ucal.h"
#include "unicode/umisc.h"
U_NAMESPACE_BEGIN
class ICUServiceFactory;
// Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
// it is a return type for a virtual method (@internal)
typedef int32_t UFieldResolutionTable[12][8];
class BasicTimeZone;
class U_I18N_API_CLASS Calendar : public UObject {
public:
#ifndef U_FORCE_HIDE_DEPRECATED_API
enum EDateFields {
#ifndef U_HIDE_DEPRECATED_API
/*
* ERA may be defined on other platforms. To avoid any potential problems undefined it here.
*/
#ifdef ERA
#undef ERA
#endif
ERA, // Example: 0..1
YEAR, // Example: 1..big number
MONTH, // Example: 0..11
WEEK_OF_YEAR, // Example: 1..53
WEEK_OF_MONTH, // Example: 1..4
DATE, // Example: 1..31
DAY_OF_YEAR, // Example: 1..365
DAY_OF_WEEK, // Example: 1..7
DAY_OF_WEEK_IN_MONTH, // Example: 1..4, may be specified as -1
AM_PM, // Example: 0..1
HOUR, // Example: 0..11
HOUR_OF_DAY, // Example: 0..23
MINUTE, // Example: 0..59
SECOND, // Example: 0..59
MILLISECOND, // Example: 0..999
ZONE_OFFSET, // Example: -12*U_MILLIS_PER_HOUR..12*U_MILLIS_PER_HOUR
DST_OFFSET, // Example: 0 or U_MILLIS_PER_HOUR
YEAR_WOY, // 'Y' Example: 1..big number - Year of Week of Year
DOW_LOCAL, // 'e' Example: 1..7 - Day of Week / Localized
EXTENDED_YEAR,
JULIAN_DAY,
MILLISECONDS_IN_DAY,
IS_LEAP_MONTH,
FIELD_COUNT = UCAL_FIELD_COUNT // See ucal.h for other fields.
#endif /* U_HIDE_DEPRECATED_API */
};
#endif // U_FORCE_HIDE_DEPRECATED_API
#ifndef U_HIDE_DEPRECATED_API
enum EDaysOfWeek {
SUNDAY = 1,
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY
};
enum EMonths {
JANUARY,
FEBRUARY,
MARCH,
APRIL,
MAY,
JUNE,
JULY,
AUGUST,
SEPTEMBER,
OCTOBER,
NOVEMBER,
DECEMBER,
UNDECIMBER
};
enum EAmpm {
AM,
PM
};
#endif /* U_HIDE_DEPRECATED_API */
U_I18N_API virtual ~Calendar();
U_I18N_API virtual Calendar* clone() const = 0;
U_I18N_API static Calendar* U_EXPORT2 createInstance(UErrorCode& success);
U_I18N_API static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt, UErrorCode& success);
U_I18N_API static Calendar* U_EXPORT2 createInstance(const TimeZone& zone, UErrorCode& success);
U_I18N_API static Calendar* U_EXPORT2 createInstance(const Locale& aLocale, UErrorCode& success);
U_I18N_API static Calendar* U_EXPORT2 createInstance(TimeZone* zoneToAdopt,
const Locale& aLocale,
UErrorCode& success);
U_I18N_API static Calendar* U_EXPORT2 createInstance(const TimeZone& zone,
const Locale& aLocale,
UErrorCode& success);
U_I18N_API static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
U_I18N_API static StringEnumeration* U_EXPORT2 getKeywordValuesForLocale(const char* key,
const Locale& locale,
UBool commonlyUsed,
UErrorCode& status);
U_I18N_API static UDate U_EXPORT2 getNow();
U_I18N_API inline UDate getTime(UErrorCode& status) const { return getTimeInMillis(status); }
U_I18N_API inline void setTime(UDate date, UErrorCode& status) { setTimeInMillis(date, status); }
U_I18N_API virtual bool operator==(const Calendar& that) const;
U_I18N_API bool operator!=(const Calendar& that) const { return !operator==(that); }
U_I18N_API virtual UBool isEquivalentTo(const Calendar& other) const;
U_I18N_API UBool equals(const Calendar& when, UErrorCode& status) const;
U_I18N_API UBool before(const Calendar& when, UErrorCode& status) const;
U_I18N_API UBool after(const Calendar& when, UErrorCode& status) const;
#ifndef U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual void add(EDateFields field, int32_t amount, UErrorCode& status);
#endif // U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual void add(UCalendarDateFields field, int32_t amount, UErrorCode& status);
#ifndef U_HIDE_DEPRECATED_API
U_I18N_API inline void roll(EDateFields field, UBool up, UErrorCode& status);
#endif /* U_HIDE_DEPRECATED_API */
U_I18N_API inline void roll(UCalendarDateFields field, UBool up, UErrorCode& status);
#ifndef U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual void roll(EDateFields field, int32_t amount, UErrorCode& status);
#endif // U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual void roll(UCalendarDateFields field, int32_t amount, UErrorCode& status);
#ifndef U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t fieldDifference(UDate when, EDateFields field, UErrorCode& status);
#endif // U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t fieldDifference(UDate when,
UCalendarDateFields field,
UErrorCode& status);
U_I18N_API void adoptTimeZone(TimeZone* value);
U_I18N_API void setTimeZone(const TimeZone& zone);
U_I18N_API const TimeZone& getTimeZone() const;
U_I18N_API TimeZone* orphanTimeZone();
U_I18N_API virtual UBool inDaylightTime(UErrorCode& status) const;
U_I18N_API void setLenient(UBool lenient);
U_I18N_API UBool isLenient() const;
U_I18N_API void setRepeatedWallTimeOption(UCalendarWallTimeOption option);
U_I18N_API UCalendarWallTimeOption getRepeatedWallTimeOption() const;
U_I18N_API void setSkippedWallTimeOption(UCalendarWallTimeOption option);
U_I18N_API UCalendarWallTimeOption getSkippedWallTimeOption() const;
U_I18N_API void setFirstDayOfWeek(UCalendarDaysOfWeek value);
#ifndef U_HIDE_DEPRECATED_API
U_I18N_API EDaysOfWeek getFirstDayOfWeek() const;
#endif /* U_HIDE_DEPRECATED_API */
U_I18N_API UCalendarDaysOfWeek getFirstDayOfWeek(UErrorCode& status) const;
U_I18N_API void setMinimalDaysInFirstWeek(uint8_t value);
U_I18N_API uint8_t getMinimalDaysInFirstWeek() const;
#ifndef U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t getMinimum(EDateFields field) const;
#endif // U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t getMinimum(UCalendarDateFields field) const;
#ifndef U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t getMaximum(EDateFields field) const;
#endif // U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t getMaximum(UCalendarDateFields field) const;
#ifndef U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t getGreatestMinimum(EDateFields field) const;
#endif // U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t getGreatestMinimum(UCalendarDateFields field) const;
#ifndef U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t getLeastMaximum(EDateFields field) const;
#endif // U_FORCE_HIDE_DEPRECATED_API
U_I18N_API virtual int32_t getLeastMaximum(UCalendarDateFields field) const;
#ifndef U_HIDE_DEPRECATED_API
U_I18N_API int32_t getActualMinimum(EDateFields field, UErrorCode& status) const;
#endif /* U_HIDE_DEPRECATED_API */
U_I18N_API virtual int32_t getActualMinimum(UCalendarDateFields field, UErrorCode& status) const;
U_I18N_API virtual int32_t getActualMaximum(UCalendarDateFields field, UErrorCode& status) const;
U_I18N_API int32_t get(UCalendarDateFields field, UErrorCode& status) const;
U_I18N_API UBool isSet(UCalendarDateFields field) const;
U_I18N_API void set(UCalendarDateFields field, int32_t value);
U_I18N_API void set(int32_t year, int32_t month, int32_t date);
U_I18N_API void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute);
U_I18N_API void set(int32_t year, int32_t month, int32_t date,
int32_t hour, int32_t minute, int32_t second);
U_I18N_API void clear();
U_I18N_API void clear(UCalendarDateFields field);
U_I18N_API virtual UClassID getDynamicClassID() const override = 0;
U_I18N_API virtual const char* getType() const = 0;
U_I18N_API virtual UCalendarWeekdayType getDayOfWeekType(UCalendarDaysOfWeek dayOfWeek,
UErrorCode& status) const;
U_I18N_API virtual int32_t getWeekendTransition(UCalendarDaysOfWeek dayOfWeek,
UErrorCode& status) const;
U_I18N_API virtual UBool isWeekend(UDate date, UErrorCode& status) const;
U_I18N_API virtual UBool isWeekend() const;
U_I18N_API virtual bool inTemporalLeapYear(UErrorCode& status) const;
U_I18N_API virtual const char* getTemporalMonthCode(UErrorCode& status) const;
U_I18N_API virtual void setTemporalMonthCode(const char* temporalMonth, UErrorCode& status);
protected:
U_I18N_API Calendar(UErrorCode& success);
U_I18N_API Calendar(const Calendar& source);
U_I18N_API Calendar& operator=(const Calendar& right);
U_I18N_API Calendar(TimeZone* zone, const Locale& aLocale, UErrorCode& success);
U_I18N_API Calendar(const TimeZone& zone, const Locale& aLocale, UErrorCode& success);
U_I18N_API virtual void computeTime(UErrorCode& status);
U_I18N_API virtual void computeFields(UErrorCode& status);
U_I18N_API double getTimeInMillis(UErrorCode& status) const;
U_I18N_API void setTimeInMillis(double millis, UErrorCode& status);
U_I18N_API void complete(UErrorCode& status);
#ifndef U_HIDE_DEPRECATED_API
U_I18N_API inline int32_t internalGet(EDateFields field) const { return fFields[field]; }
#endif /* U_HIDE_DEPRECATED_API */
#ifndef U_HIDE_INTERNAL_API
U_I18N_API inline int32_t internalGet(UCalendarDateFields field, int32_t defaultValue) const {
return fStamp[field] > kUnset ? fFields[field] : defaultValue;
}
U_I18N_API inline int32_t internalGet(UCalendarDateFields field) const { return fFields[field]; }
U_I18N_API virtual bool isEra0CountingBackward() const { return false; }
U_I18N_API virtual int32_t getRelatedYearDifference() const;
#endif /* U_HIDE_INTERNAL_API */
U_I18N_API virtual int32_t internalGetMonth(UErrorCode& status) const;
U_I18N_API virtual int32_t internalGetMonth(int32_t defaultValue, UErrorCode& status) const;
#ifndef U_HIDE_DEPRECATED_API
U_I18N_API void internalSet(EDateFields field, int32_t value);
#endif /* U_HIDE_DEPRECATED_API */
U_I18N_API inline void internalSet(UCalendarDateFields field, int32_t value);
U_I18N_API virtual void prepareGetActual(UCalendarDateFields field,
UBool isMinimum,
UErrorCode& status);
enum ELimitType {
#ifndef U_HIDE_INTERNAL_API
UCAL_LIMIT_MINIMUM = 0,
UCAL_LIMIT_GREATEST_MINIMUM,
UCAL_LIMIT_LEAST_MAXIMUM,
UCAL_LIMIT_MAXIMUM,
UCAL_LIMIT_COUNT
#endif /* U_HIDE_INTERNAL_API */
};
U_I18N_API virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const = 0;
U_I18N_API virtual int32_t getLimit(UCalendarDateFields field, ELimitType limitType) const;
U_I18N_API virtual int64_t handleComputeMonthStart(int32_t eyear,
int32_t month,
UBool useMonth,
UErrorCode& status) const = 0;
U_I18N_API virtual int32_t handleGetMonthLength(int32_t extendedYear,
int32_t month,
UErrorCode& status) const;
U_I18N_API virtual int32_t handleGetYearLength(int32_t eyear, UErrorCode& status) const;
U_I18N_API virtual int32_t handleGetExtendedYear(UErrorCode& status) = 0;
U_I18N_API virtual int32_t handleComputeJulianDay(UCalendarDateFields bestField, UErrorCode& status);
U_I18N_API virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy,
int32_t woy,
UErrorCode& status);
U_I18N_API virtual void validateField(UCalendarDateFields field, UErrorCode& status);
#ifndef U_HIDE_INTERNAL_API
U_I18N_API int32_t computeJulianDay(UErrorCode& status);
U_I18N_API double computeMillisInDay();
U_I18N_API int32_t computeZoneOffset(double millis, double millisInDay, UErrorCode& ec);
U_I18N_API int32_t newestStamp(UCalendarDateFields start,
UCalendarDateFields end,
int32_t bestSoFar) const;
U_I18N_API static constexpr int32_t kResolveSTOP = -1;
U_I18N_API static constexpr int32_t kResolveRemap = 32;
U_I18N_API static const UFieldResolutionTable kDatePrecedence[];
U_I18N_API static const UFieldResolutionTable kYearPrecedence[];
U_I18N_API static const UFieldResolutionTable kDOWPrecedence[];
U_I18N_API static const UFieldResolutionTable kMonthPrecedence[];
U_I18N_API UCalendarDateFields resolveFields(const UFieldResolutionTable* precedenceTable) const;
#endif /* U_HIDE_INTERNAL_API */
U_I18N_API virtual const UFieldResolutionTable* getFieldResolutionTable() const;
#ifndef U_HIDE_INTERNAL_API
U_I18N_API UCalendarDateFields newerField(UCalendarDateFields defaultField,
UCalendarDateFields alternateField) const;
#endif /* U_HIDE_INTERNAL_API */
private:
int32_t getActualHelper(UCalendarDateFields field, int32_t startValue, int32_t endValue, UErrorCode &status) const;
protected:
U_I18N_API UDate internalGetTime() const { return fTime; }
U_I18N_API void internalSetTime(UDate time) { fTime = time; }
int32_t fFields[UCAL_FIELD_COUNT];
protected:
enum {
kUnset = 0,
kInternallySet,
kMinimumUserStamp
};
private:
int8_t fStamp[UCAL_FIELD_COUNT];
protected:
U_I18N_API virtual void handleComputeFields(int32_t julianDay, UErrorCode& status);
#ifndef U_HIDE_INTERNAL_API
U_I18N_API int32_t getGregorianYear() const {
return fGregorianYear;
}
U_I18N_API int32_t getGregorianMonth() const {
return fGregorianMonth;
}
U_I18N_API int32_t getGregorianDayOfYear() const {
return fGregorianDayOfYear;
}
U_I18N_API int32_t getGregorianDayOfMonth() const {
return fGregorianDayOfMonth;
}
#endif /* U_HIDE_INTERNAL_API */
U_I18N_API virtual int32_t getDefaultMonthInYear(int32_t eyear, UErrorCode& status);
U_I18N_API virtual int32_t getDefaultDayInMonth(int32_t eyear, int32_t month, UErrorCode& status);
//-------------------------------------------------------------------------
// Protected utility methods for use by subclasses. These are very handy
// for implementing add, roll, and computeFields.
//-------------------------------------------------------------------------
U_I18N_API virtual void pinField(UCalendarDateFields field, UErrorCode& status);
U_I18N_API int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t dayOfWeek);
#ifndef U_HIDE_INTERNAL_API
U_I18N_API inline int32_t weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek);
U_I18N_API int32_t getLocalDOW(UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
private:
int8_t fNextStamp = kMinimumUserStamp;
void recalculateStamp();
UDate fTime = 0;
TimeZone* fZone = nullptr;
bool fIsTimeSet:1;
bool fAreFieldsSet:1;
bool fAreAllFieldsSet:1;
bool fAreFieldsVirtuallySet:1;
bool fLenient:1;
UCalendarWallTimeOption fRepeatedWallTime:3; // Somehow MSVC need 3 bits for UCalendarWallTimeOption
UCalendarWallTimeOption fSkippedWallTime:3; // Somehow MSVC need 3 bits for UCalendarWallTimeOption
UCalendarDaysOfWeek fFirstDayOfWeek:4; // Somehow MSVC need 4 bits for
// UCalendarDaysOfWeek
UCalendarDaysOfWeek fWeekendOnset:4; // Somehow MSVC need 4 bits for
// UCalendarDaysOfWeek
UCalendarDaysOfWeek fWeekendCease:4; // Somehow MSVC need 4 bits for
// UCalendarDaysOfWeek
uint8_t fMinimalDaysInFirstWeek;
int32_t fWeekendOnsetMillis;
int32_t fWeekendCeaseMillis;
void setWeekData(const Locale& desiredLocale, const char *type, UErrorCode& success);
void updateTime(UErrorCode& status);
int32_t fGregorianYear;
int8_t fGregorianMonth;
int8_t fGregorianDayOfMonth;
int16_t fGregorianDayOfYear;
/* calculations */
protected:
U_I18N_API void computeGregorianFields(int32_t julianDay, UErrorCode& ec);
private:
void computeWeekFields(UErrorCode &ec);
void validateFields(UErrorCode &status);
void validateField(UCalendarDateFields field, int32_t min, int32_t max, UErrorCode& status);
protected:
#ifndef U_HIDE_INTERNAL_API
U_I18N_API static uint8_t julianDayToDayOfWeek(int32_t julian);
#endif /* U_HIDE_INTERNAL_API */
private:
Locale validLocale;
Locale actualLocale;
public:
#if !UCONFIG_NO_SERVICE
#ifndef U_HIDE_INTERNAL_API
U_I18N_API static StringEnumeration* getAvailableLocales();
U_I18N_API static URegistryKey registerFactory(ICUServiceFactory* toAdopt, UErrorCode& status);
U_I18N_API static UBool unregister(URegistryKey key, UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
friend class CalendarFactory;
friend class CalendarService;
friend class DefaultCalendarFactory;
#endif /* !UCONFIG_NO_SERVICE */
U_I18N_API virtual UBool haveDefaultCentury() const = 0;
U_I18N_API virtual UDate defaultCenturyStart() const = 0;
U_I18N_API virtual int32_t defaultCenturyStartYear() const = 0;
U_I18N_API Locale getLocale(ULocDataLocaleType type, UErrorCode& status) const;
U_I18N_API virtual int32_t getRelatedYear(UErrorCode& status) const;
U_I18N_API virtual void setRelatedYear(int32_t year);
#ifndef U_HIDE_INTERNAL_API
U_I18N_API const char* getLocaleID(ULocDataLocaleType type, UErrorCode& status) const;
#endif /* U_HIDE_INTERNAL_API */
private:
BasicTimeZone* getBasicTimeZone() const;
UBool getImmediatePreviousZoneTransition(UDate base, UDate *transitionTime, UErrorCode& status) const;
public:
#ifndef U_HIDE_INTERNAL_API
U_I18N_API static Calendar* U_EXPORT2 makeInstance(const Locale& locale, UErrorCode& status);
U_I18N_API static void U_EXPORT2 getCalendarTypeFromLocale(const Locale& locale,
char* typeBuffer,
int32_t typeBufferSize,
UErrorCode& status);
#endif /* U_HIDE_INTERNAL_API */
};
// -------------------------------------
inline Calendar*
Calendar::createInstance(TimeZone* zone, UErrorCode& errorCode)
{
// since the Locale isn't specified, use the default locale
return createInstance(zone, Locale::getDefault(), errorCode);
}
// -------------------------------------
inline void
Calendar::roll(UCalendarDateFields field, UBool up, UErrorCode& status)
{
roll(field, static_cast<int32_t>(up ? +1 : -1), status);
}
#ifndef U_HIDE_DEPRECATED_API
inline void
Calendar::roll(EDateFields field, UBool up, UErrorCode& status)
{
roll(static_cast<UCalendarDateFields>(field), up, status);
}
#endif /* U_HIDE_DEPRECATED_API */
// -------------------------------------
inline void
Calendar::internalSet(UCalendarDateFields field, int32_t value)
{
fFields[field] = value;
fStamp[field] = kInternallySet;
}
#define DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY \
virtual UBool haveDefaultCentury() const override; \
virtual UDate defaultCenturyStart() const override; \
virtual int32_t defaultCenturyStartYear() const override;
#ifndef U_HIDE_INTERNAL_API
inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek)
{
return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek);
}
#endif /* U_HIDE_INTERNAL_API */
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // _CALENDAR
icu::BasicTimeZone
BasicTimeZone is an abstract class extending TimeZone.
Definition basictz.h:38
icu::Calendar
Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...
Definition calendar.h:189
icu::Calendar::computeJulianDay
U_I18N_API int32_t computeJulianDay(UErrorCode &status)
Compute the Julian day from fields.
icu::Calendar::getDynamicClassID
virtual U_I18N_API UClassID getDynamicClassID() const override=0
Returns a unique class ID POLYMORPHICALLY.
icu::Calendar::computeMillisInDay
U_I18N_API double computeMillisInDay()
Compute the milliseconds in the day from the fields.
icu::Calendar::getGregorianYear
U_I18N_API int32_t getGregorianYear() const
Return the extended year on the Gregorian calendar as computed by computeGregorianFields().
Definition calendar.h:1987
icu::Calendar::getAvailableLocales
static U_I18N_API const Locale * getAvailableLocales(int32_t &count)
Returns a list of the locales for which Calendars are installed.
icu::Calendar::getCalendarTypeFromLocale
static U_I18N_API void getCalendarTypeFromLocale(const Locale &locale, char *typeBuffer, int32_t typeBufferSize, UErrorCode &status)
Get the calendar type for given locale.
icu::Calendar::adoptTimeZone
U_I18N_API void adoptTimeZone(TimeZone *value)
Sets the calendar's time zone to be the one passed in.
icu::Calendar::getLocale
U_I18N_API Locale getLocale(ULocDataLocaleType type, UErrorCode &status) const
Get the locale for this calendar object.
icu::Calendar::registerFactory
static U_I18N_API URegistryKey registerFactory(ICUServiceFactory *toAdopt, UErrorCode &status)
Register a new Calendar factory.
icu::Calendar::getFieldResolutionTable
virtual U_I18N_API const UFieldResolutionTable * getFieldResolutionTable() const
icu::Calendar::kDOWPrecedence
static U_I18N_API const UFieldResolutionTable kDOWPrecedence[]
Precedence table for Day of Week.
Definition calendar.h:1847
icu::Calendar::getLeastMaximum
virtual U_I18N_API int32_t getLeastMaximum(EDateFields field) const
Gets the lowest maximum value for the given field if varies.
icu::Calendar::setRepeatedWallTimeOption
U_I18N_API void setRepeatedWallTimeOption(UCalendarWallTimeOption option)
Sets the behavior for handling wall time repeating multiple times at negative time zone offset transi...
icu::Calendar::set
U_I18N_API void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, int32_t second)
Sets the values for the fields YEAR, MONTH, DATE, HOUR_OF_DAY, MINUTE, and SECOND.
icu::Calendar::unregister
static U_I18N_API UBool unregister(URegistryKey key, UErrorCode &status)
Unregister a previously-registered CalendarFactory using the key returned from the register call.
icu::Calendar::getTime
U_I18N_API UDate getTime(UErrorCode &status) const
Gets this Calendar's time as milliseconds.
Definition calendar.h:436
icu::Calendar::handleComputeJulianDay
virtual U_I18N_API int32_t handleComputeJulianDay(UCalendarDateFields bestField, UErrorCode &status)
Subclasses may override this.
icu::Calendar::operator==
virtual U_I18N_API bool operator==(const Calendar &that) const
Compares the equality of two Calendar objects.
icu::Calendar::getTimeZone
U_I18N_API const TimeZone & getTimeZone() const
Returns a reference to the time zone owned by this calendar.
icu::Calendar::setTimeInMillis
U_I18N_API void setTimeInMillis(double millis, UErrorCode &status)
Sets this Calendar's current time from the given long value.
icu::Calendar::computeTime
virtual U_I18N_API void computeTime(UErrorCode &status)
Converts Calendar's time field values to GMT as milliseconds.
icu::Calendar::roll
virtual U_I18N_API void roll(UCalendarDateFields field, int32_t amount, UErrorCode &status)
Time Field Rolling function.
icu::Calendar::Calendar
U_I18N_API Calendar(TimeZone *zone, const Locale &aLocale, UErrorCode &success)
Constructs a Calendar with the given time zone and locale.
icu::Calendar::getMaximum
virtual U_I18N_API int32_t getMaximum(UCalendarDateFields field) const
Gets the maximum value for the given time field.
icu::Calendar::before
U_I18N_API UBool before(const Calendar &when, UErrorCode &status) const
Returns true if this Calendar's current time is before "when"'s current time.
icu::Calendar::createInstance
static U_I18N_API Calendar * createInstance(UErrorCode &success)
Creates a Calendar using the default timezone and locale.
icu::Calendar::isLenient
U_I18N_API UBool isLenient() const
Tells whether date/time interpretation is to be lenient.
icu::Calendar::set
U_I18N_API void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute)
Sets the values for the fields YEAR, MONTH, DATE, HOUR_OF_DAY, and MINUTE.
icu::Calendar::handleGetExtendedYear
virtual U_I18N_API int32_t handleGetExtendedYear(UErrorCode &status)=0
Return the extended year defined by the current fields.
icu::Calendar::roll
virtual U_I18N_API void roll(EDateFields field, int32_t amount, UErrorCode &status)
Time Field Rolling function.
icu::Calendar::getActualMinimum
virtual U_I18N_API int32_t getActualMinimum(UCalendarDateFields field, UErrorCode &status) const
Return the minimum value that this field could have, given the current date.
icu::Calendar::computeZoneOffset
U_I18N_API int32_t computeZoneOffset(double millis, double millisInDay, UErrorCode &ec)
This method can assume EXTENDED_YEAR has been set.
icu::Calendar::handleGetExtendedYearFromWeekFields
virtual U_I18N_API 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 ...
icu::Calendar::EDaysOfWeek
EDaysOfWeek
Useful constant for days of week.
Definition calendar.h:243
icu::Calendar::operator=
U_I18N_API Calendar & operator=(const Calendar &right)
Default assignment operator.
icu::Calendar::newerField
U_I18N_API UCalendarDateFields newerField(UCalendarDateFields defaultField, UCalendarDateFields alternateField) const
Return the field that is newer, either defaultField, or alternateField.
icu::Calendar::setLenient
U_I18N_API void setLenient(UBool lenient)
Specifies whether or not date/time interpretation is to be lenient.
icu::Calendar::getActualMinimum
U_I18N_API int32_t getActualMinimum(EDateFields field, UErrorCode &status) const
Return the minimum value that this field could have, given the current date.
icu::Calendar::internalGetMonth
virtual U_I18N_API int32_t internalGetMonth(int32_t defaultValue, UErrorCode &status) const
Use this function instead of internalGet(UCAL_MONTH, defaultValue).
icu::Calendar::resolveFields
U_I18N_API UCalendarDateFields resolveFields(const UFieldResolutionTable *precedenceTable) const
Given a precedence table, return the newest field combination in the table, or UCAL_FIELD_COUNT if no...
icu::Calendar::createInstance
static U_I18N_API Calendar * createInstance(const TimeZone &zone, const Locale &aLocale, UErrorCode &success)
Gets a Calendar using the given timezone and given locale.
icu::Calendar::EDateFields
EDateFields
Field IDs for date and time.
Definition calendar.h:198
icu::Calendar::getTimeInMillis
U_I18N_API double getTimeInMillis(UErrorCode &status) const
Gets this Calendar's current time as a long.
icu::Calendar::setFirstDayOfWeek
U_I18N_API void setFirstDayOfWeek(UCalendarDaysOfWeek value)
Sets what the first day of the week is; e.g., Sunday in US, Monday in France.
icu::Calendar::internalSetTime
U_I18N_API void internalSetTime(UDate time)
Set the current time without affecting flags or fields.
Definition calendar.h:1928
icu::Calendar::kYearPrecedence
static U_I18N_API const UFieldResolutionTable kYearPrecedence[]
Precedence table for Year.
Definition calendar.h:1840
icu::Calendar::pinField
virtual U_I18N_API void pinField(UCalendarDateFields field, UErrorCode &status)
Adjust the specified field so that it is within the allowable range for the date to which this calend...
icu::Calendar::ELimitType
ELimitType
Limit enums.
Definition calendar.h:1643
icu::Calendar::fieldDifference
virtual U_I18N_API int32_t fieldDifference(UDate when, UCalendarDateFields field, UErrorCode &status)
Return the difference between the given time and the time this calendar object is set to.
icu::Calendar::getSkippedWallTimeOption
U_I18N_API UCalendarWallTimeOption getSkippedWallTimeOption() const
Gets the behavior for handling skipped wall time at positive time zone offset transitions.
icu::Calendar::internalGet
U_I18N_API int32_t internalGet(UCalendarDateFields field) const
Gets the value for a given time field.
Definition calendar.h:1561
icu::Calendar::clear
U_I18N_API void clear()
Clears the values of all the time fields, making them both unset and assigning them a value of zero.
icu::Calendar::add
virtual U_I18N_API void add(UCalendarDateFields field, int32_t amount, UErrorCode &status)
UDate Arithmetic function.
icu::Calendar::getLocaleID
U_I18N_API const char * getLocaleID(ULocDataLocaleType type, UErrorCode &status) const
Get the locale for this calendar object.
icu::Calendar::handleGetMonthLength
virtual U_I18N_API 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.
icu::Calendar::getDayOfWeekType
virtual U_I18N_API UCalendarWeekdayType getDayOfWeekType(UCalendarDaysOfWeek dayOfWeek, UErrorCode &status) const
Returns whether the given day of the week is a weekday, a weekend day, or a day that transitions from...
icu::Calendar::operator!=
U_I18N_API bool operator!=(const Calendar &that) const
Compares the inequality of two Calendar objects.
Definition calendar.h:471
icu::Calendar::getMinimum
virtual U_I18N_API int32_t getMinimum(UCalendarDateFields field) const
Gets the minimum value for the given time field.
icu::Calendar::julianDayToDayOfWeek
static U_I18N_API uint8_t julianDayToDayOfWeek(int32_t julian)
Convert a quasi Julian date to the day of the week.
icu::Calendar::weekNumber
U_I18N_API int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t dayOfWeek)
Return the week number of a day, within a period.
icu::Calendar::internalSet
U_I18N_API void internalSet(EDateFields field, int32_t value)
Sets the value for a given time field.
icu::Calendar::getLeastMaximum
virtual U_I18N_API int32_t getLeastMaximum(UCalendarDateFields field) const
Gets the lowest maximum value for the given field if varies.
icu::Calendar::set
U_I18N_API void set(int32_t year, int32_t month, int32_t date)
Sets the values for the fields YEAR, MONTH, and DATE.
icu::Calendar::isEra0CountingBackward
virtual U_I18N_API bool isEra0CountingBackward() const
The year in this calendar is counting from 1 backward if the era is 0.
Definition calendar.h:1568
icu::Calendar::kMonthPrecedence
static U_I18N_API const UFieldResolutionTable kMonthPrecedence[]
Precedence table for Months.
Definition calendar.h:1854
icu::Calendar::fFields
int32_t fFields[UCAL_FIELD_COUNT]
The time fields containing values into which the millis is computed.
Definition calendar.h:1934
icu::Calendar::handleGetLimit
virtual U_I18N_API int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const =0
Subclass API for defining limits of different types.
icu::Calendar::createInstance
static U_I18N_API Calendar * createInstance(const Locale &aLocale, UErrorCode &success)
Creates a Calendar using the default timezone and the given locale.
icu::Calendar::defaultCenturyStartYear
virtual U_I18N_API int32_t defaultCenturyStartYear() const =0
icu::Calendar::CalendarFactory
friend class CalendarFactory
Multiple Calendar Implementation.
Definition calendar.h:2427
icu::Calendar::isSet
U_I18N_API UBool isSet(UCalendarDateFields field) const
Determines if the given time field has a value set.
icu::Calendar::setRelatedYear
virtual U_I18N_API void setRelatedYear(int32_t year)
icu::Calendar::inDaylightTime
virtual U_I18N_API UBool inDaylightTime(UErrorCode &status) const
Queries if the current date for this Calendar is in Daylight Savings Time.
icu::Calendar::getKeywordValuesForLocale
static U_I18N_API StringEnumeration * getKeywordValuesForLocale(const char *key, const Locale &locale, UBool commonlyUsed, UErrorCode &status)
Given a key and a locale, returns an array of string values in a preferred order that would make a di...
icu::Calendar::internalGet
U_I18N_API int32_t internalGet(UCalendarDateFields field, int32_t defaultValue) const
Gets the value for a given time field.
Definition calendar.h:1549
icu::Calendar::internalGet
U_I18N_API int32_t internalGet(EDateFields field) const
Gets the value for a given time field.
Definition calendar.h:1535
icu::Calendar::getRepeatedWallTimeOption
U_I18N_API UCalendarWallTimeOption getRepeatedWallTimeOption() const
Gets the behavior for handling wall time repeating multiple times at negative time zone offset transi...
icu::Calendar::getRelatedYear
virtual U_I18N_API int32_t getRelatedYear(UErrorCode &status) const
icu::Calendar::isWeekend
virtual U_I18N_API UBool isWeekend() const
Returns true if this Calendar's current date-time is in the weekend in this calendar system.
icu::Calendar::getFirstDayOfWeek
U_I18N_API UCalendarDaysOfWeek getFirstDayOfWeek(UErrorCode &status) const
Gets what the first day of the week is; e.g., Sunday in US, Monday in France.
icu::Calendar::roll
U_I18N_API void roll(EDateFields field, UBool up, UErrorCode &status)
Time Field Rolling function.
Definition calendar.h:2556
icu::Calendar::prepareGetActual
virtual U_I18N_API void prepareGetActual(UCalendarDateFields field, UBool isMinimum, UErrorCode &status)
Prepare this calendar for computing the actual minimum or maximum.
icu::Calendar::handleGetYearLength
virtual U_I18N_API int32_t handleGetYearLength(int32_t eyear, UErrorCode &status) const
Return the number of days in the given extended year of this calendar system.
icu::Calendar::getType
virtual U_I18N_API const char * getType() const =0
Returns the calendar type name string for this Calendar object.
icu::Calendar::getGregorianDayOfYear
U_I18N_API int32_t getGregorianDayOfYear() const
Return the day of year (1-based) on the Gregorian calendar as computed by computeGregorianFields().
Definition calendar.h:2005
icu::Calendar::internalGetMonth
virtual U_I18N_API int32_t internalGetMonth(UErrorCode &status) const
Use this function instead of internalGet(UCAL_MONTH).
icu::Calendar::isEquivalentTo
virtual U_I18N_API UBool isEquivalentTo(const Calendar &other) const
Returns true if the given Calendar object is equivalent to this one.
icu::Calendar::haveDefaultCentury
virtual U_I18N_API UBool haveDefaultCentury() const =0
icu::Calendar::handleComputeMonthStart
virtual U_I18N_API 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...
icu::Calendar::~Calendar
virtual U_I18N_API ~Calendar()
destructor
icu::Calendar::getGregorianMonth
U_I18N_API int32_t getGregorianMonth() const
Return the month (0-based) on the Gregorian calendar as computed by computeGregorianFields().
Definition calendar.h:1996
icu::Calendar::getMinimum
virtual U_I18N_API int32_t getMinimum(EDateFields field) const
Gets the minimum value for the given time field.
icu::Calendar::clone
virtual U_I18N_API Calendar * clone() const =0
Create and return a polymorphic copy of this calendar.
icu::Calendar::getDefaultDayInMonth
virtual U_I18N_API int32_t getDefaultDayInMonth(int32_t eyear, int32_t month, UErrorCode &status)
Called by computeJulianDay.
icu::Calendar::computeFields
virtual U_I18N_API void computeFields(UErrorCode &status)
Converts GMT as milliseconds to time field values.
icu::Calendar::inTemporalLeapYear
virtual U_I18N_API bool inTemporalLeapYear(UErrorCode &status) const
Returns true if the date is in a leap year.
icu::Calendar::setMinimalDaysInFirstWeek
U_I18N_API void setMinimalDaysInFirstWeek(uint8_t value)
Sets what the minimal days required in the first week of the year are; For example,...
icu::Calendar::add
virtual U_I18N_API void add(EDateFields field, int32_t amount, UErrorCode &status)
UDate Arithmetic function.
icu::Calendar::defaultCenturyStart
virtual U_I18N_API UDate defaultCenturyStart() const =0
icu::Calendar::clear
U_I18N_API void clear(UCalendarDateFields field)
Clears the value in the given time field, both making it unset and assigning it a value of zero.
icu::Calendar::fieldDifference
virtual U_I18N_API int32_t fieldDifference(UDate when, EDateFields field, UErrorCode &status)
Return the difference between the given time and the time this calendar object is set to.
icu::Calendar::kDatePrecedence
static U_I18N_API const UFieldResolutionTable kDatePrecedence[]
Precedence table for Dates.
Definition calendar.h:1833
icu::Calendar::getMinimalDaysInFirstWeek
U_I18N_API uint8_t getMinimalDaysInFirstWeek() const
Gets what the minimal days required in the first week of the year are; e.g., if the first week is def...
icu::Calendar::getGreatestMinimum
virtual U_I18N_API int32_t getGreatestMinimum(EDateFields field) const
Gets the highest minimum value for the given field if varies.
icu::Calendar::equals
U_I18N_API UBool equals(const Calendar &when, UErrorCode &status) const
Compares the Calendar time, whereas Calendar::operator== compares the equality of Calendar objects.
icu::Calendar::setSkippedWallTimeOption
U_I18N_API void setSkippedWallTimeOption(UCalendarWallTimeOption option)
Sets the behavior for handling skipped wall time at positive time zone offset transitions.
icu::Calendar::Calendar
U_I18N_API Calendar(const Calendar &source)
Copy constructor.
icu::Calendar::createInstance
static U_I18N_API Calendar * createInstance(TimeZone *zoneToAdopt, const Locale &aLocale, UErrorCode &success)
Creates a Calendar using the given timezone and given locale.
icu::Calendar::makeInstance
static U_I18N_API Calendar * makeInstance(const Locale &locale, UErrorCode &status)
Creates a new Calendar from a Locale for the cache.
icu::Calendar::EAmpm
EAmpm
Useful constants for hour in 12-hour clock.
Definition calendar.h:277
icu::Calendar::getLimit
virtual U_I18N_API int32_t getLimit(UCalendarDateFields field, ELimitType limitType) const
Return a limit for a field.
icu::Calendar::complete
U_I18N_API void complete(UErrorCode &status)
Recomputes the current time from currently set fields, and then fills in any unset fields in the time...
icu::Calendar::set
U_I18N_API void set(UCalendarDateFields field, int32_t value)
Sets the given time field with the given value.
icu::Calendar::getAvailableLocales
static U_I18N_API StringEnumeration * getAvailableLocales()
INTERNAL FOR 2.6 – Registration.
icu::Calendar::setTime
U_I18N_API void setTime(UDate date, UErrorCode &status)
Sets this Calendar's current time with the given UDate.
Definition calendar.h:448
icu::Calendar::internalGetTime
U_I18N_API UDate internalGetTime() const
Get the current time without recomputing.
Definition calendar.h:1919
icu::Calendar::getGreatestMinimum
virtual U_I18N_API int32_t getGreatestMinimum(UCalendarDateFields field) const
Gets the highest minimum value for the given field if varies.
icu::Calendar::getGregorianDayOfMonth
U_I18N_API int32_t getGregorianDayOfMonth() const
Return the day of month (1-based) on the Gregorian calendar as computed by computeGregorianFields().
Definition calendar.h:2014
icu::Calendar::getActualMaximum
virtual U_I18N_API int32_t getActualMaximum(UCalendarDateFields field, UErrorCode &status) const
Return the maximum value that this field could have, given the current date.
icu::Calendar::getLocalDOW
U_I18N_API int32_t getLocalDOW(UErrorCode &status)
returns the local DOW, valid range 0..6
icu::Calendar::after
U_I18N_API UBool after(const Calendar &when, UErrorCode &status) const
Returns true if this Calendar's current time is after "when"'s current time.
icu::Calendar::getFirstDayOfWeek
U_I18N_API EDaysOfWeek getFirstDayOfWeek() const
Gets what the first day of the week is; e.g., Sunday in US, Monday in France.
icu::Calendar::setTimeZone
U_I18N_API void setTimeZone(const TimeZone &zone)
Sets the calendar's time zone to be the same as the one passed in.
icu::Calendar::getDefaultMonthInYear
virtual U_I18N_API int32_t getDefaultMonthInYear(int32_t eyear, UErrorCode &status)
Called by computeJulianDay.
icu::Calendar::createInstance
static U_I18N_API Calendar * createInstance(const TimeZone &zone, UErrorCode &success)
Creates a Calendar using the given timezone and the default locale.
icu::Calendar::Calendar
U_I18N_API Calendar(UErrorCode &success)
Constructs a Calendar with the default time zone as returned by TimeZone::createInstance(),...
icu::Calendar::orphanTimeZone
U_I18N_API TimeZone * orphanTimeZone()
Returns the time zone owned by this calendar.
icu::Calendar::validateField
virtual U_I18N_API void validateField(UCalendarDateFields field, UErrorCode &status)
Validate a single field of this calendar.
icu::Calendar::kResolveRemap
static U_I18N_API constexpr int32_t kResolveRemap
Value to be bitwised "ORed" against resolve table field values for remapping.
Definition calendar.h:1826
icu::Calendar::handleComputeFields
virtual U_I18N_API void handleComputeFields(int32_t julianDay, UErrorCode &status)
Subclasses may override this method to compute several fields specific to each calendar system.
icu::Calendar::Calendar
U_I18N_API Calendar(const TimeZone &zone, const Locale &aLocale, UErrorCode &success)
Constructs a Calendar with the given time zone and locale.
icu::Calendar::getTemporalMonthCode
virtual U_I18N_API const char * getTemporalMonthCode(UErrorCode &status) const
Gets The Temporal monthCode value corresponding to the month for the date.
icu::Calendar::EMonths
EMonths
Useful constants for month.
Definition calendar.h:257
icu::Calendar::kResolveSTOP
static U_I18N_API constexpr int32_t kResolveSTOP
Marker for end of resolve set (row or group).
Definition calendar.h:1815
icu::Calendar::getMaximum
virtual U_I18N_API int32_t getMaximum(EDateFields field) const
Gets the maximum value for the given time field.
icu::Calendar::computeGregorianFields
U_I18N_API void computeGregorianFields(int32_t julianDay, UErrorCode &ec)
Compute the Gregorian calendar year, month, and day of month from the Julian day.
icu::Calendar::CalendarService
friend class CalendarService
Multiple Calendar Implementation.
Definition calendar.h:2433
icu::Calendar::setTemporalMonthCode
virtual U_I18N_API void setTemporalMonthCode(const char *temporalMonth, UErrorCode &status)
Sets The Temporal monthCode which is a string identifier that starts with the literal grapheme "M" fo...
icu::Calendar::newestStamp
U_I18N_API int32_t newestStamp(UCalendarDateFields start, UCalendarDateFields end, int32_t bestSoFar) const
Determine the best stamp in a range.
icu::Calendar::isWeekend
virtual U_I18N_API UBool isWeekend(UDate date, UErrorCode &status) const
Returns true if the given UDate is in the weekend in this calendar system.
icu::Calendar::getNow
static U_I18N_API UDate getNow()
Returns the current UTC (GMT) time measured in milliseconds since 0:00:00 on 1/1/70 (derived from the...
icu::Calendar::get
U_I18N_API int32_t get(UCalendarDateFields field, UErrorCode &status) const
Gets the value for a given time field.
icu::Calendar::getRelatedYearDifference
virtual U_I18N_API int32_t getRelatedYearDifference() const
Related year difference.
icu::Calendar::DefaultCalendarFactory
friend class DefaultCalendarFactory
Multiple Calendar Implementation.
Definition calendar.h:2439
icu::Calendar::getWeekendTransition
virtual U_I18N_API int32_t getWeekendTransition(UCalendarDaysOfWeek dayOfWeek, UErrorCode &status) const
Returns the time during the day at which the weekend begins or ends in this calendar system.
icu::Locale
A Locale object represents a specific geographical, political, or cultural region.
Definition locid.h:198
icu::Locale::getDefault
static U_COMMON_API const Locale & getDefault()
Common methods of getting the current default Locale.
icu::StringEnumeration
Base class for 'pure' C++ implementations of uenum api.
Definition strenum.h:61
icu::TimeZone
TimeZone represents a time zone offset, and also figures out daylight savings.
Definition timezone.h:133
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition uobject.h:222
locid.h
C++ API: Locale ID object.
icu::UFieldResolutionTable
int32_t UFieldResolutionTable[12][8]
Definition calendar.h:55
icu::operator==
U_COMMON_API UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
timezone.h
C++ API: TimeZone object.
ucal.h
C API: Calendar.
UCalendarDateFields
UCalendarDateFields
Possible fields in a UCalendar.
Definition ucal.h:202
UCAL_FIELD_COUNT
@ UCAL_FIELD_COUNT
One more than the highest normal UCalendarDateFields value.
Definition ucal.h:477
UCalendarWallTimeOption
UCalendarWallTimeOption
Options for handling ambiguous wall time at time zone offset transitions.
Definition ucal.h:991
UCalendarWeekdayType
UCalendarWeekdayType
Weekday types, as returned by ucal_getDayOfWeekType().
Definition ucal.h:1455
UCalendarDaysOfWeek
UCalendarDaysOfWeek
Useful constant for days of week.
Definition ucal.h:502
ULocDataLocaleType
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested,...
Definition uloc.h:338
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:269
umisc.h
C API: Miscellaneous definitions.
URegistryKey
const void * URegistryKey
Opaque type returned by registerInstance, registerFactory and unregister for service registration.
Definition umisc.h:57
uobject.h
C++ API: Common ICU base class UObject.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:96
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:509
U_I18N_API_CLASS
#define U_I18N_API_CLASS
Set to export library symbols from inside the i18n library, and to import them from outside,...
Definition utypes.h:457
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:316
UDate
double UDate
Date and Time data type.
Definition utypes.h:218