17 #if U_SHOW_CPLUSPLUS_API
19 #endif // U_SHOW_CPLUSPLUS_API
21 #if !UCONFIG_NO_FORMATTING
166 #define UCAL_UNKNOWN_ZONE_ID "Etc/Unknown"
447 #ifndef U_FORCE_HIDE_DEPRECATED_API
453 #endif // U_FORCE_HIDE_DEPRECATED_API
764 #if U_SHOW_CPLUSPLUS_API
823 int32_t resultLength,
862 int32_t resultLength,
1030 U_CAPI const char* U_EXPORT2
1330 U_CAPI const char * U_EXPORT2
1339 U_CAPI const char * U_EXPORT2
1370 U_CAPI const char * U_EXPORT2
1620 #ifndef U_FORCE_HIDE_DRAFT_API
1628 #ifndef U_HIDE_DRAFT_API
1683 UCAL_TZ_LOCAL_NONE = 0,
1720 int32_t* rawOffset, int32_t* dstOffset,
UErrorCode* status);
U_CAPI UEnumeration * ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char *region, const int32_t *rawOffset, UErrorCode *ec)
Create an enumeration over system time zone IDs with the given filter conditions. ...
A better name for UCAL_TRADITIONAL.
void * UCalendar
A calendar.
U_CAPI int32_t ucal_get(const UCalendar *cal, UCalendarDateFields field, UErrorCode *status)
Get the current value of a field from a UCalendar.
UTimeZoneLocalOption
Options used by ucal_getTimeZoneOffsetFromLocal and BasicTimeZone::getOffsetFromLocal() to specify ho...
U_CAPI int32_t ucal_getHostTimeZone(UChar *result, int32_t resultCapacity, UErrorCode *ec)
Return the current host time zone.
Field number indicating the day number within the current year.
U_CAPI UBool ucal_inDaylightTime(const UCalendar *cal, UErrorCode *status)
Determine if a UCalendar is currently in daylight savings time.
U_CAPI int32_t ucal_getWindowsTimeZoneID(const UChar *id, int32_t len, UChar *winid, int32_t winidCapacity, UErrorCode *status)
Converts a system time zone ID to an equivalent Windows time zone ID.
Short standard display name.
U_CAPI UEnumeration * ucal_getKeywordValuesForLocale(const char *key, const char *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...
UCalendarDateFields
Possible fields in a UCalendar.
Field number indicating the day of the month.
Ranges from 0 to 23:59:59.999 (regardless of DST).
Minimum number of days in first week.
#define U_CAPI
This is used to declare a function as a public ICU C API.
U_CAPI UCalendarWeekdayType ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status)
Returns whether the given day of the week is a weekday, a weekend day, or a day that transitions from...
U_CAPI void ucal_setTimeZone(UCalendar *cal, const UChar *zoneID, int32_t len, UErrorCode *status)
Set the TimeZone used by a UCalendar.
Field number indicating the era, e.g., AD or BC in the Gregorian (Julian) calendar.
U_CAPI void ucal_add(UCalendar *cal, UCalendarDateFields field, int32_t amount, UErrorCode *status)
Add a specified signed amount to a particular field in a UCalendar.
Designates a day that starts as the weekend and transitions to a weekday.
Get the next transition on or after the current date, i.e.
U_CAPI UBool ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status)
Returns true if the given UDate is in the weekend in this calendar system.
Designates a full weekday (no part of the day is included in the weekend).
Value of the UCAL_MONTH field indicating the thirteenth month of the year.
Get the next transition after the current date, i.e.
double UDate
Date and Time data type.
U_CAPI UDate ucal_getNow(void)
Get the current date and time.
Field number indicating the week number within the current month.
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Field number indicating the millisecond within the second.
Year of this calendar system, encompassing all supra-year fields.
An input time is interpreted as daylight saving time when local time is switched to/from standard tim...
U_CAPI void ucal_roll(UCalendar *cal, UCalendarDateFields field, int32_t amount, UErrorCode *status)
Add a specified signed amount to a particular field in a UCalendar.
An input time is interpreted as standard time when local time is switched to/from daylight saving tim...
U_CAPI UDate ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode)
Gets the Gregorian Calendar change date.
U_CAPI UDate ucal_getMillis(const UCalendar *cal, UErrorCode *status)
Get a UCalendar's current time in millis.
UCalendarWeekdayType
Weekday types, as returned by ucal_getDayOfWeekType().
U_CAPI UBool ucal_getTimeZoneTransitionDate(const UCalendar *cal, UTimeZoneTransitionType type, UDate *transition, UErrorCode *status)
Get the UDate for the next/previous time zone transition relative to the calendar's current date...
Field number indicating the extended year corresponding to the UCAL_WEEK_OF_YEAR field.
Field number indicating the day of the month.
"Smart pointer" class, closes a UCalendar via ucal_close().
U_CAPI void ucal_set(UCalendar *cal, UCalendarDateFields field, int32_t value)
Set the value of a field in a UCalendar.
UCalendarAttribute
Types of UCalendar attributes.
UTimeZoneTransitionType
Time zone transition types for ucal_getTimeZoneTransitionDate.
Get the previous transition before the current date, i.e.
U_CAPI void ucal_getTimeZoneOffsetFromLocal(const UCalendar *cal, UTimeZoneLocalOption nonExistingTimeOpt, UTimeZoneLocalOption duplicatedTimeOpt, int32_t *rawOffset, int32_t *dstOffset, UErrorCode *status)
Returns the time zone raw and GMT offset for the given moment in time.
An ambiguous wall time to be interpreted as the earliest.
U_CAPI UBool ucal_equivalentTo(const UCalendar *cal1, const UCalendar *cal2)
Returns true if two UCalendars are equivalent.
U_CAPI void ucal_setDateTime(UCalendar *cal, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, int32_t second, UErrorCode *status)
Set a UCalendar's current date.
UCalendarWallTimeOption
Options for handling ambiguous wall time at time zone offset transitions.
Field number indicating whether the HOUR is before or after noon.
Field number indicating the ordinal number of the day of the week within the current month...
U_CAPI const char * ucal_getAvailable(int32_t localeIndex)
Get a locale for which calendars are available.
U_CAPI UEnumeration * ucal_openTimeZones(UErrorCode *ec)
Create an enumeration over all time zones.
An input time is always interpreted as local time after a time zone transition.
U_CAPI int32_t ucal_getFieldDifference(UCalendar *cal, UDate target, UCalendarDateFields field, UErrorCode *status)
Return the difference between the target time and the time this calendar object is currently set to...
Short daylight savings display name.
UCalendarDaysOfWeek
Useful constant for days of week.
U_CAPI void ucal_setAttribute(UCalendar *cal, UCalendarAttribute attr, int32_t newValue)
Set a numeric attribute associated with a UCalendar.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Daylight savings display name.
Despite the name, UCAL_TRADITIONAL designates the locale's default calendar, which may be the Gregori...
U_CAPI void ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode)
Sets the GregorianCalendar change date.
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
U_CAPI int32_t ucal_getDefaultTimeZone(UChar *result, int32_t resultCapacity, UErrorCode *ec)
Return the default time zone.
U_CAPI void ucal_close(UCalendar *cal)
Close a UCalendar.
Canonical system zones associated with actual locations.
U_CAPI UBool ucal_isSet(const UCalendar *cal, UCalendarDateFields field)
Determine if a field in a UCalendar is set.
An input time is interpreted as standard time when local time is switched to/from daylight saving tim...
Field number indicating the hour of the morning or afternoon.
Field number indicating the minute within the hour.
U_CAPI int32_t ucal_countAvailable(void)
Determine how many locales have calendars available.
An input time is interpreted as daylight saving time when local time is switched to/from standard tim...
An input time is always interpreted as local time before a time zone transition.
Field number indicating the day of the week.
Whether or not the current month is a leap month (0 or 1).
The behavior for handling skipped wall time at positive time zone offset transitions.
Field number indicating the year.
Get the previous transition on or before the current date, i.e.
U_CAPI int32_t ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status)
Returns the time during the day at which the weekend begins or ends in this calendar system...
U_CAPI void ucal_setDefaultTimeZone(const UChar *zoneID, UErrorCode *ec)
Set the default time zone.
char16_t UChar
The base type for UTF-16 code units and pointers.
UCalendarType
Possible types of UCalendars.
An ambiguous wall time to be interpreted as the next valid wall time.
U_CAPI int32_t ucal_getLimit(const UCalendar *cal, UCalendarDateFields field, UCalendarLimitType type, UErrorCode *status)
Determine a limit for a field in a UCalendar.
USystemTimeZoneType
System time zone type constants used by filtering zones in ucal_openTimeZoneIDEnumeration.
Field number indicating the localized day of week.
U_CAPI void ucal_setDate(UCalendar *cal, int32_t year, int32_t month, int32_t date, UErrorCode *status)
Set a UCalendar's current date.
Designates a full weekend day (the entire day is included in the weekend).
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
U_CAPI int32_t ucal_getTimeZoneID(const UCalendar *cal, UChar *result, int32_t resultLength, UErrorCode *status)
Get the ID of the UCalendar's time zone.
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
Unambiguously designates the Gregorian calendar for the locale.
C API: String Enumeration.
U_CAPI UCalendar * ucal_clone(const UCalendar *cal, UErrorCode *status)
Open a copy of a UCalendar.
U_CAPI const char * ucal_getType(const UCalendar *cal, UErrorCode *status)
Get the resource keyword value string designating the calendar type for the UCalendar.
U_CAPI int32_t ucal_getTimeZoneIDForWindowsID(const UChar *winid, int32_t len, const char *region, UChar *id, int32_t idCapacity, UErrorCode *status)
Converts a Windows time zone ID to an equivalent system time zone ID for a region.
U_CAPI int32_t ucal_getTimeZoneDisplayName(const UCalendar *cal, UCalendarDisplayNameType type, const char *locale, UChar *result, int32_t resultLength, UErrorCode *status)
Get the display name for a UCalendar's TimeZone.
Basic definitions for ICU, for both C and C++ APIs.
The behavior for handling wall time repeating multiple times at negative time zone offset transitions...
U_CAPI void ucal_setMillis(UCalendar *cal, UDate dateTime, UErrorCode *status)
Set a UCalendar's current time in millis.
Designates a day that starts as a weekday and transitions to the weekend.
Field number indicating the daylight savings offset in milliseconds.
Field number indicating the second within the minute.
One more than the highest normal UCalendarDateFields value.
U_CAPI UCalendar * ucal_open(const UChar *zoneID, int32_t len, const char *locale, UCalendarType type, UErrorCode *status)
Open a UCalendar.
U_CAPI const char * ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode *status)
Get the locale for this calendar object.
U_CAPI void ucal_clear(UCalendar *calendar)
Clear all fields in a UCalendar.
UCalendarDisplayNameType
Possible formats for a UCalendar's display name.
U_CAPI const char * ucal_getTZDataVersion(UErrorCode *status)
Returns the timezone data version currently used by ICU.
Field number indicating the raw offset from GMT in milliseconds.
U_CAPI int32_t ucal_getCanonicalTimeZoneID(const UChar *id, int32_t len, UChar *result, int32_t resultCapacity, UBool *isSystemID, UErrorCode *status)
Returns the canonical system timezone ID or the normalized custom time zone ID for the given time zon...
UCalendarAMPMs
Possible AM/PM values in a UCalendar.
Field number indicating the week number within the current year.
UCalendarLimitType
Possible limit values for a UCalendar.
UCalendarMonths
Possible months in a UCalendar.
U_CAPI void ucal_clearField(UCalendar *cal, UCalendarDateFields field)
Clear a field in a UCalendar.
An ambiguous wall time to be interpreted as the latest.
Field number indicating the hour of the day.
Field number indicating the modified Julian day number.
U_CAPI int32_t ucal_getAttribute(const UCalendar *cal, UCalendarAttribute attr)
Get a numeric attribute associated with a UCalendar.
U_CAPI UEnumeration * ucal_openCountryTimeZones(const char *country, UErrorCode *ec)
Create an enumeration over all time zones associated with the given country.
int8_t UBool
The ICU boolean type, a signed-byte integer.
Field number indicating the month.
U_CAPI int32_t ucal_getDSTSavings(const UChar *zoneID, UErrorCode *ec)
Return the amount of time in milliseconds that the clock is advanced during daylight savings time for...