32 #if U_SHOW_CPLUSPLUS_API 38 #if !UCONFIG_NO_FORMATTING 48 class ICUServiceFactory;
191 #ifndef U_FORCE_HIDE_DEPRECATED_API 199 #ifndef U_HIDE_DEPRECATED_API 214 DAY_OF_WEEK_IN_MONTH,
234 #endif // U_FORCE_HIDE_DEPRECATED_API 236 #ifndef U_HIDE_DEPRECATED_API 391 U_I18N_API static const Locale* U_EXPORT2 getAvailableLocales(int32_t& count);
531 #ifndef U_FORCE_HIDE_DEPRECATED_API 553 #endif // U_FORCE_HIDE_DEPRECATED_API 577 #ifndef U_HIDE_DEPRECATED_API 647 #ifndef U_FORCE_HIDE_DEPRECATED_API 680 #endif // U_FORCE_HIDE_DEPRECATED_API 715 #ifndef U_FORCE_HIDE_DEPRECATED_API 772 #endif // U_FORCE_HIDE_DEPRECATED_API 980 #ifndef U_HIDE_DEPRECATED_API 987 U_I18N_API EDaysOfWeek getFirstDayOfWeek()
const;
1008 U_I18N_API void setMinimalDaysInFirstWeek(uint8_t value);
1019 U_I18N_API uint8_t getMinimalDaysInFirstWeek()
const;
1021 #ifndef U_FORCE_HIDE_DEPRECATED_API 1030 U_I18N_API virtual int32_t getMinimum(EDateFields field)
const;
1031 #endif // U_FORCE_HIDE_DEPRECATED_API 1043 #ifndef U_FORCE_HIDE_DEPRECATED_API 1052 U_I18N_API virtual int32_t getMaximum(EDateFields field)
const;
1053 #endif // U_FORCE_HIDE_DEPRECATED_API 1065 #ifndef U_FORCE_HIDE_DEPRECATED_API 1074 U_I18N_API virtual int32_t getGreatestMinimum(EDateFields field)
const;
1075 #endif // U_FORCE_HIDE_DEPRECATED_API 1087 #ifndef U_FORCE_HIDE_DEPRECATED_API 1096 U_I18N_API virtual int32_t getLeastMaximum(EDateFields field)
const;
1097 #endif // U_FORCE_HIDE_DEPRECATED_API 1109 #ifndef U_HIDE_DEPRECATED_API 1205 U_I18N_API void set(int32_t year, int32_t month, int32_t date);
1219 U_I18N_API void set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute);
1234 U_I18N_API void set(int32_t year, int32_t month, int32_t date,
1235 int32_t hour, int32_t minute, int32_t second);
1305 U_I18N_API virtual const char* getType()
const = 0;
1526 #ifndef U_HIDE_DEPRECATED_API 1538 #ifndef U_HIDE_INTERNAL_API 1550 return fStamp[field] > kUnset ? fFields[field] : defaultValue;
1575 U_I18N_API virtual int32_t getRelatedYearDifference()
const;
1605 #ifndef U_HIDE_DEPRECATED_API 1615 U_I18N_API void internalSet(EDateFields field, int32_t value);
1644 #ifndef U_HIDE_INTERNAL_API 1645 UCAL_LIMIT_MINIMUM = 0,
1646 UCAL_LIMIT_GREATEST_MINIMUM,
1647 UCAL_LIMIT_LEAST_MAXIMUM,
1700 U_I18N_API virtual int64_t handleComputeMonthStart(int32_t eyear,
1712 U_I18N_API virtual int32_t handleGetMonthLength(int32_t extendedYear,
1755 U_I18N_API virtual int32_t handleGetExtendedYearFromWeekFields(int32_t yearWoy,
1767 #ifndef U_HIDE_INTERNAL_API 1807 int32_t bestSoFar)
const;
1891 #ifndef U_HIDE_INTERNAL_API 1981 #ifndef U_HIDE_INTERNAL_API 1988 return fGregorianYear;
1997 return fGregorianMonth;
2006 return fGregorianDayOfYear;
2015 return fGregorianDayOfMonth;
2038 U_I18N_API virtual int32_t getDefaultDayInMonth(int32_t eyear, int32_t month,
UErrorCode& status);
2119 U_I18N_API int32_t weekNumber(int32_t desiredDay, int32_t dayOfPeriod, int32_t dayOfWeek);
2121 #ifndef U_HIDE_INTERNAL_API 2152 U_I18N_API inline int32_t weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek);
2166 int8_t fNextStamp = kMinimumUserStamp;
2172 void recalculateStamp();
2199 bool fAreFieldsSet:1;
2205 bool fAreAllFieldsSet:1;
2213 bool fAreFieldsVirtuallySet:1;
2246 uint8_t fMinimalDaysInFirstWeek;
2247 int32_t fWeekendOnsetMillis;
2248 int32_t fWeekendCeaseMillis;
2260 void setWeekData(
const Locale& desiredLocale,
const char *type,
UErrorCode& success);
2278 int32_t fGregorianYear;
2285 int8_t fGregorianMonth;
2292 int8_t fGregorianDayOfMonth;
2299 int16_t fGregorianDayOfYear;
2358 #ifndef U_HIDE_INTERNAL_API 2368 U_I18N_API static uint8_t julianDayToDayOfWeek(int32_t julian);
2376 #if !UCONFIG_NO_SERVICE 2381 #ifndef U_HIDE_INTERNAL_API 2427 friend class CalendarFactory;
2433 friend class CalendarService;
2439 friend class DefaultCalendarFactory;
2458 U_I18N_API virtual int32_t defaultCenturyStartYear()
const = 0;
2480 U_I18N_API virtual void setRelatedYear(int32_t year);
2482 #ifndef U_HIDE_INTERNAL_API 2509 #ifndef U_HIDE_INTERNAL_API 2530 U_I18N_API static void U_EXPORT2 getCalendarTypeFromLocale(
const Locale& locale,
2532 int32_t typeBufferSize,
2543 return createInstance(zone, Locale::getDefault(), errorCode);
2551 roll(field, static_cast<int32_t>(up ? +1 : -1), status);
2554 #ifndef U_HIDE_DEPRECATED_API 2558 roll(static_cast<UCalendarDateFields>(field), up, status);
2573 fFields[field] = value;
2574 fStamp[field] = kInternallySet;
2583 #define DECLARE_OVERRIDE_SYSTEM_DEFAULT_CENTURY \ 2584 virtual UBool haveDefaultCentury() const override; \ 2585 virtual UDate defaultCenturyStart() const override; \ 2586 virtual int32_t defaultCenturyStartYear() const override; 2588 #ifndef U_HIDE_INTERNAL_API 2589 inline int32_t Calendar::weekNumber(int32_t dayOfPeriod, int32_t dayOfWeek)
2591 return weekNumber(dayOfPeriod, dayOfPeriod, dayOfWeek);
U_I18N_API UDate getTime(UErrorCode &status) const
Gets this Calendar's time as milliseconds.
UCalendarDateFields
Possible fields in a UCalendar.
U_I18N_API int32_t getGregorianDayOfMonth() const
Return the day of month (1-based) on the Gregorian calendar as computed by computeGregorianFields().
U_COMMON_API UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
U_I18N_API int32_t internalGet(UCalendarDateFields field, int32_t defaultValue) const
Gets the value for a given time field.
Calendar is an abstract base class for converting between a UDate object and a set of integer fields ...
C++ API: TimeZone object.
double UDate
Date and Time data type.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
C API: Miscellaneous definitions.
Base class for 'pure' C++ implementations of uenum api.
EMonths
Useful constants for month.
U_I18N_API bool operator!=(const Calendar &that) const
Compares the inequality of two Calendar objects.
TimeZone represents a time zone offset, and also figures out daylight savings.
U_I18N_API int32_t internalGet(EDateFields field) const
Gets the value for a given time field.
UCalendarWeekdayType
Weekday types, as returned by ucal_getDayOfWeekType().
U_I18N_API void setTime(UDate date, UErrorCode &status)
Sets this Calendar's current time with the given UDate.
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
UCalendarWallTimeOption
Options for handling ambiguous wall time at time zone offset transitions.
#define U_I18N_API_CLASS
Set to export library symbols from inside the i18n library, and to import them from outside...
U_I18N_API UDate internalGetTime() const
Get the current time without recomputing.
UCalendarDaysOfWeek
Useful constant for days of week.
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
EAmpm
Useful constants for hour in 12-hour clock.
BasicTimeZone is an abstract class extending TimeZone.
EDaysOfWeek
Useful constant for days of week.
U_I18N_API void internalSetTime(UDate time)
Set the current time without affecting flags or fields.
C++ API: Common ICU base class UObject.
const void * URegistryKey
Opaque type returned by registerInstance, registerFactory and unregister for service registration...
U_I18N_API int32_t getGregorianMonth() const
Return the month (0-based) on the Gregorian calendar as computed by computeGregorianFields().
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
C++ API: Locale ID object.
EDateFields
Field IDs for date and time.
virtual U_I18N_API bool isEra0CountingBackward() const
The year in this calendar is counting from 1 backward if the era is 0.
Basic definitions for ICU, for both C and C++ APIs.
One more than the highest normal UCalendarDateFields value.
U_I18N_API int32_t getGregorianYear() const
Return the extended year on the Gregorian calendar as computed by computeGregorianFields().
UObject is the common ICU "boilerplate" class.
int32_t UFieldResolutionTable[12][8]
U_I18N_API int32_t getGregorianDayOfYear() const
Return the day of year (1-based) on the Gregorian calendar as computed by computeGregorianFields().
int8_t UBool
The ICU boolean type, a signed-byte integer.
U_I18N_API int32_t internalGet(UCalendarDateFields field) const
Gets the value for a given time field.
A Locale object represents a specific geographical, political, or cultural region.