ICU 66.1  66.1
ucal.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4  *******************************************************************************
5  * Copyright (C) 1996-2015, International Business Machines Corporation and
6  * others. All Rights Reserved.
7  *******************************************************************************
8  */
9 
10 #ifndef UCAL_H
11 #define UCAL_H
12 
13 #include "unicode/utypes.h"
14 #include "unicode/uenum.h"
15 #include "unicode/uloc.h"
16 #include "unicode/localpointer.h"
17 
18 #if !UCONFIG_NO_FORMATTING
19 
163 #define UCAL_UNKNOWN_ZONE_ID "Etc/Unknown"
164 
169 typedef void* UCalendar;
170 
191 };
192 
195 
206 
212 
233 
246 
261 
270 
277 
293 
318 
329 
340 
349 
357 
365 
373 
380 
387 
396 
404 
412 
424 
435 
441 
442  /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
443  * it is needed for layout of Calendar, DateFormat, and other objects */
444 #ifndef U_FORCE_HIDE_DEPRECATED_API
445 
450 #endif // U_FORCE_HIDE_DEPRECATED_API
451 
461 };
462 
488 };
489 
492 
526 };
527 
530 
539 };
540 
543 
566 };
567 
570 
587 U_STABLE UEnumeration* U_EXPORT2
588 ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* region,
589  const int32_t* rawOffset, UErrorCode* ec);
590 
602 U_STABLE UEnumeration* U_EXPORT2
604 
621 U_STABLE UEnumeration* U_EXPORT2
622 ucal_openCountryTimeZones(const char* country, UErrorCode* ec);
623 
647 U_STABLE int32_t U_EXPORT2
648 ucal_getDefaultTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec);
649 
659 U_STABLE void U_EXPORT2
660 ucal_setDefaultTimeZone(const UChar* zoneID, UErrorCode* ec);
661 
662 #ifndef U_HIDE_DRAFT_API
663 
693 U_DRAFT int32_t U_EXPORT2
694 ucal_getHostTimeZone(UChar *result, int32_t resultCapacity, UErrorCode *ec);
695 
696 #endif // U_HIDE_DRAFT_API
697 
714 U_STABLE int32_t U_EXPORT2
715 ucal_getDSTSavings(const UChar* zoneID, UErrorCode* ec);
716 
723 U_STABLE UDate U_EXPORT2
724 ucal_getNow(void);
725 
749 U_STABLE UCalendar* U_EXPORT2
750 ucal_open(const UChar* zoneID,
751  int32_t len,
752  const char* locale,
753  UCalendarType type,
754  UErrorCode* status);
755 
762 U_STABLE void U_EXPORT2
763 ucal_close(UCalendar *cal);
764 
765 #if U_SHOW_CPLUSPLUS_API
766 
767 U_NAMESPACE_BEGIN
768 
779 
780 U_NAMESPACE_END
781 
782 #endif
783 
792 U_STABLE UCalendar* U_EXPORT2
793 ucal_clone(const UCalendar* cal,
794  UErrorCode* status);
795 
805 U_STABLE void U_EXPORT2
807  const UChar* zoneID,
808  int32_t len,
809  UErrorCode* status);
810 
821 U_STABLE int32_t U_EXPORT2
822 ucal_getTimeZoneID(const UCalendar *cal,
823  UChar *result,
824  int32_t resultLength,
825  UErrorCode *status);
826 
840 };
841 
844 
858 U_STABLE int32_t U_EXPORT2
861  const char* locale,
862  UChar* result,
863  int32_t resultLength,
864  UErrorCode* status);
865 
874 U_STABLE UBool U_EXPORT2
875 ucal_inDaylightTime(const UCalendar* cal,
876  UErrorCode* status );
877 
898 U_STABLE void U_EXPORT2
899 ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode);
900 
921 U_STABLE UDate U_EXPORT2
922 ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode);
923 
956 };
957 
960 
987 };
990 
1002 U_STABLE int32_t U_EXPORT2
1003 ucal_getAttribute(const UCalendar* cal,
1004  UCalendarAttribute attr);
1005 
1017 U_STABLE void U_EXPORT2
1019  UCalendarAttribute attr,
1020  int32_t newValue);
1021 
1031 U_STABLE const char* U_EXPORT2
1032 ucal_getAvailable(int32_t localeIndex);
1033 
1042 U_STABLE int32_t U_EXPORT2
1043 ucal_countAvailable(void);
1044 
1056 U_STABLE UDate U_EXPORT2
1057 ucal_getMillis(const UCalendar* cal,
1058  UErrorCode* status);
1059 
1071 U_STABLE void U_EXPORT2
1073  UDate dateTime,
1074  UErrorCode* status );
1075 
1090 U_STABLE void U_EXPORT2
1091 ucal_setDate(UCalendar* cal,
1092  int32_t year,
1093  int32_t month,
1094  int32_t date,
1095  UErrorCode* status);
1096 
1114 U_STABLE void U_EXPORT2
1116  int32_t year,
1117  int32_t month,
1118  int32_t date,
1119  int32_t hour,
1120  int32_t minute,
1121  int32_t second,
1122  UErrorCode* status);
1123 
1133 U_STABLE UBool U_EXPORT2
1134 ucal_equivalentTo(const UCalendar* cal1,
1135  const UCalendar* cal2);
1136 
1155 U_STABLE void U_EXPORT2
1156 ucal_add(UCalendar* cal,
1157  UCalendarDateFields field,
1158  int32_t amount,
1159  UErrorCode* status);
1160 
1185 U_STABLE void U_EXPORT2
1186 ucal_roll(UCalendar* cal,
1187  UCalendarDateFields field,
1188  int32_t amount,
1189  UErrorCode* status);
1190 
1207 U_STABLE int32_t U_EXPORT2
1208 ucal_get(const UCalendar* cal,
1209  UCalendarDateFields field,
1210  UErrorCode* status );
1211 
1227 U_STABLE void U_EXPORT2
1228 ucal_set(UCalendar* cal,
1229  UCalendarDateFields field,
1230  int32_t value);
1231 
1247 U_STABLE UBool U_EXPORT2
1248 ucal_isSet(const UCalendar* cal,
1249  UCalendarDateFields field);
1250 
1265 U_STABLE void U_EXPORT2
1267  UCalendarDateFields field);
1268 
1279 U_STABLE void U_EXPORT2
1280 ucal_clear(UCalendar* calendar);
1281 
1299 };
1300 
1303 
1318 U_STABLE int32_t U_EXPORT2
1319 ucal_getLimit(const UCalendar* cal,
1320  UCalendarDateFields field,
1321  UCalendarLimitType type,
1322  UErrorCode* status);
1323 
1331 U_STABLE const char * U_EXPORT2
1332 ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode* status);
1333 
1340 U_STABLE const char * U_EXPORT2
1342 
1361 U_STABLE int32_t U_EXPORT2
1362 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
1363  UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status);
1371 U_STABLE const char * U_EXPORT2
1372 ucal_getType(const UCalendar *cal, UErrorCode* status);
1373 
1390 U_STABLE UEnumeration* U_EXPORT2
1391 ucal_getKeywordValuesForLocale(const char* key,
1392  const char* locale,
1393  UBool commonlyUsed,
1394  UErrorCode* status);
1395 
1396 
1423 };
1424 
1427 
1446 ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status);
1447 
1463 U_STABLE int32_t U_EXPORT2
1464 ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status);
1465 
1476 U_STABLE UBool U_EXPORT2
1477 ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
1478 
1503 U_STABLE int32_t U_EXPORT2
1505  UDate target,
1506  UCalendarDateFields field,
1507  UErrorCode* status);
1508 
1538 };
1539 
1557 U_STABLE UBool U_EXPORT2
1559  UDate* transition, UErrorCode* status);
1560 
1585 U_STABLE int32_t U_EXPORT2
1586 ucal_getWindowsTimeZoneID(const UChar* id, int32_t len,
1587  UChar* winid, int32_t winidCapacity, UErrorCode* status);
1588 
1617 U_STABLE int32_t U_EXPORT2
1618 ucal_getTimeZoneIDForWindowsID(const UChar* winid, int32_t len, const char* region,
1619  UChar* id, int32_t idCapacity, UErrorCode* status);
1620 
1621 #endif /* #if !UCONFIG_NO_FORMATTING */
1622 
1623 #endif
ucal_getAvailable
const char * ucal_getAvailable(int32_t localeIndex)
Get a locale for which calendars are available.
ucal_setAttribute
void ucal_setAttribute(UCalendar *cal, UCalendarAttribute attr, int32_t newValue)
Set a numeric attribute associated with a UCalendar.
UCAL_WEEKEND_ONSET
@ UCAL_WEEKEND_ONSET
Designates a day that starts as a weekday and transitions to the weekend.
Definition: ucal.h:1416
UCAL_DST_OFFSET
@ UCAL_DST_OFFSET
Field number indicating the daylight savings offset in milliseconds.
Definition: ucal.h:386
ucal_getDayOfWeekType
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...
UCAL_GREGORIAN
@ UCAL_GREGORIAN
Unambiguously designates the Gregorian calendar for the locale.
Definition: ucal.h:190
ucal_roll
void ucal_roll(UCalendar *cal, UCalendarDateFields field, int32_t amount, UErrorCode *status)
Add a specified signed amount to a particular field in a UCalendar.
UCAL_TUESDAY
@ UCAL_TUESDAY
Tuesday.
Definition: ucal.h:479
UCalendarAMPMs
UCalendarAMPMs
Possible AM/PM values in a UCalendar.
Definition: ucal.h:534
ucal_setMillis
void ucal_setMillis(UCalendar *cal, UDate dateTime, UErrorCode *status)
Set a UCalendar's current time in millis.
ucal_getNow
UDate ucal_getNow(void)
Get the current date and time.
ucal_getLocaleByType
const char * ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode *status)
Get the locale for this calendar object.
UCAL_JANUARY
@ UCAL_JANUARY
January.
Definition: ucal.h:498
ucal_getWindowsTimeZoneID
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.
ucal_isWeekend
UBool ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status)
Returns TRUE if the given UDate is in the weekend in this calendar system.
UCAL_WALLTIME_LAST
@ UCAL_WALLTIME_LAST
An ambiguous wall time to be interpreted as the latest.
Definition: ucal.h:973
ucal_setDate
void ucal_setDate(UCalendar *cal, int32_t year, int32_t month, int32_t date, UErrorCode *status)
Set a UCalendar's current date.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UCalendarWallTimeOption
UCalendarWallTimeOption
Options for handling ambiguous wall time at time zone offset transitions.
Definition: ucal.h:966
ucal_getDefaultTimeZone
int32_t ucal_getDefaultTimeZone(UChar *result, int32_t resultCapacity, UErrorCode *ec)
Return the default time zone.
ucal_getGregorianChange
UDate ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode)
Gets the Gregorian Calendar change date.
UCAL_MONTH
@ UCAL_MONTH
Field number indicating the month.
Definition: ucal.h:232
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:261
UCAL_WEDNESDAY
@ UCAL_WEDNESDAY
Wednesday.
Definition: ucal.h:481
UCAL_ZONE_OFFSET
@ UCAL_ZONE_OFFSET
Field number indicating the raw offset from GMT in milliseconds.
Definition: ucal.h:379
ucal_setDefaultTimeZone
void ucal_setDefaultTimeZone(const UChar *zoneID, UErrorCode *ec)
Set the default time zone.
ULocDataLocaleType
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested,...
Definition: uloc.h:338
UCAL_DAY_OF_WEEK_IN_MONTH
@ UCAL_DAY_OF_WEEK_IN_MONTH
Field number indicating the ordinal number of the day of the week within the current month.
Definition: ucal.h:317
ucal_getHostTimeZone
int32_t ucal_getHostTimeZone(UChar *result, int32_t resultCapacity, UErrorCode *ec)
Return the current host time zone.
UCalendarLimitType
UCalendarLimitType
Possible limit values for a UCalendar.
Definition: ucal.h:1286
ucal_getDSTSavings
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...
UCAL_NOVEMBER
@ UCAL_NOVEMBER
November.
Definition: ucal.h:518
UCAL_MAY
@ UCAL_MAY
May.
Definition: ucal.h:506
UCAL_JULIAN_DAY
@ UCAL_JULIAN_DAY
Field number indicating the modified Julian day number.
Definition: ucal.h:423
ucal_getMillis
UDate ucal_getMillis(const UCalendar *cal, UErrorCode *status)
Get a UCalendar's current time in millis.
UCAL_SUNDAY
@ UCAL_SUNDAY
Sunday.
Definition: ucal.h:475
ucal_clone
UCalendar * ucal_clone(const UCalendar *cal, UErrorCode *status)
Open a copy of a UCalendar.
ucal_close
void ucal_close(UCalendar *cal)
Close a UCalendar.
UCAL_FEBRUARY
@ UCAL_FEBRUARY
February.
Definition: ucal.h:500
UCAL_DAY_OF_YEAR
@ UCAL_DAY_OF_YEAR
Field number indicating the day number within the current year.
Definition: ucal.h:276
UCAL_SHORT_STANDARD
@ UCAL_SHORT_STANDARD
Short standard display name.
Definition: ucal.h:835
ucal_isSet
UBool ucal_isSet(const UCalendar *cal, UCalendarDateFields field)
Determine if a field in a UCalendar is set.
UCAL_JUNE
@ UCAL_JUNE
June.
Definition: ucal.h:508
ucal_getAttribute
int32_t ucal_getAttribute(const UCalendar *cal, UCalendarAttribute attr)
Get a numeric attribute associated with a UCalendar.
UCAL_LEAST_MAXIMUM
@ UCAL_LEAST_MAXIMUM
Leaest maximum value.
Definition: ucal.h:1294
UCAL_JULY
@ UCAL_JULY
July.
Definition: ucal.h:510
UCAL_MINIMAL_DAYS_IN_FIRST_WEEK
@ UCAL_MINIMAL_DAYS_IN_FIRST_WEEK
Minimum number of days in first week.
Definition: ucal.h:943
ucal_getTimeZoneIDForWindowsID
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.
UCAL_WEEK_OF_MONTH
@ UCAL_WEEK_OF_MONTH
Field number indicating the week number within the current month.
Definition: ucal.h:260
uloc.h
C API: Locale.
UCAL_ZONE_TYPE_CANONICAL_LOCATION
@ UCAL_ZONE_TYPE_CANONICAL_LOCATION
Canonical system zones associated with actual locations.
Definition: ucal.h:565
ucal_setGregorianChange
void ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode)
Sets the GregorianCalendar change date.
ucal_getTZDataVersion
const char * ucal_getTZDataVersion(UErrorCode *status)
Returns the timezone data version currently used by ICU.
ucal_add
void ucal_add(UCalendar *cal, UCalendarDateFields field, int32_t amount, UErrorCode *status)
Add a specified signed amount to a particular field in a UCalendar.
UCAL_MILLISECOND
@ UCAL_MILLISECOND
Field number indicating the millisecond within the second.
Definition: ucal.h:372
ucal_getWeekendTransition
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.
UCAL_EXTENDED_YEAR
@ UCAL_EXTENDED_YEAR
Year of this calendar system, encompassing all supra-year fields.
Definition: ucal.h:411
UCAL_STANDARD
@ UCAL_STANDARD
Standard display name.
Definition: ucal.h:833
UCAL_TZ_TRANSITION_NEXT_INCLUSIVE
@ UCAL_TZ_TRANSITION_NEXT_INCLUSIVE
Get the next transition on or after the current date, i.e.
Definition: ucal.h:1525
UCAL_FRIDAY
@ UCAL_FRIDAY
Friday.
Definition: ucal.h:485
UCAL_MONDAY
@ UCAL_MONDAY
Monday.
Definition: ucal.h:477
UCAL_WEEKEND_CEASE
@ UCAL_WEEKEND_CEASE
Designates a day that starts as the weekend and transitions to a weekday.
Definition: ucal.h:1422
UCAL_MINUTE
@ UCAL_MINUTE
Field number indicating the minute within the hour.
Definition: ucal.h:356
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:415
UCAL_MINIMUM
@ UCAL_MINIMUM
Minimum value.
Definition: ucal.h:1288
UCAL_ACTUAL_MAXIMUM
@ UCAL_ACTUAL_MAXIMUM
Actual maximum value.
Definition: ucal.h:1298
ucal_setDateTime
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.
ucal_inDaylightTime
UBool ucal_inDaylightTime(const UCalendar *cal, UErrorCode *status)
Determine if a UCalendar is currently in daylight savings time.
ucal_get
int32_t ucal_get(const UCalendar *cal, UCalendarDateFields field, UErrorCode *status)
Get the current value of a field from a UCalendar.
ucal_getTimeZoneDisplayName
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.
ucal_set
void ucal_set(UCalendar *cal, UCalendarDateFields field, int32_t value)
Set the value of a field in a UCalendar.
UCAL_DAY_OF_WEEK
@ UCAL_DAY_OF_WEEK
Field number indicating the day of the week.
Definition: ucal.h:292
UCAL_YEAR_WOY
@ UCAL_YEAR_WOY
Field number indicating the extended year corresponding to the UCAL_WEEK_OF_YEAR field.
Definition: ucal.h:395
UCAL_IS_LEAP_MONTH
@ UCAL_IS_LEAP_MONTH
Whether or not the current month is a leap month (0 or 1).
Definition: ucal.h:440
UCAL_DAY_OF_MONTH
@ UCAL_DAY_OF_MONTH
Field number indicating the day of the month.
Definition: ucal.h:460
UCAL_ZONE_TYPE_CANONICAL
@ UCAL_ZONE_TYPE_CANONICAL
Canonical system zones.
Definition: ucal.h:560
UCAL_YEAR
@ UCAL_YEAR
Field number indicating the year.
Definition: ucal.h:211
UTimeZoneTransitionType
UTimeZoneTransitionType
Time zone transition types for ucal_getTimeZoneTransitionDate.
Definition: ucal.h:1513
UCAL_WEEKEND
@ UCAL_WEEKEND
Designates a full weekend day (the entire day is included in the weekend).
Definition: ucal.h:1410
ucal_equivalentTo
UBool ucal_equivalentTo(const UCalendar *cal1, const UCalendar *cal2)
Returns TRUE if two UCalendars are equivalent.
UCAL_AM_PM
@ UCAL_AM_PM
Field number indicating whether the HOUR is before or after noon.
Definition: ucal.h:328
UCalendarWeekdayType
UCalendarWeekdayType
Weekday types, as returned by ucal_getDayOfWeekType().
Definition: ucal.h:1400
UCAL_SATURDAY
@ UCAL_SATURDAY
Saturday.
Definition: ucal.h:487
UCAL_MARCH
@ UCAL_MARCH
March.
Definition: ucal.h:502
LocalUCalendarPointer
ucal_getType
const char * ucal_getType(const UCalendar *cal, UErrorCode *status)
Get the resource keyword value string designating the calendar type for the UCalendar.
UCAL_OCTOBER
@ UCAL_OCTOBER
October.
Definition: ucal.h:516
UCAL_TZ_TRANSITION_PREVIOUS
@ UCAL_TZ_TRANSITION_PREVIOUS
Get the previous transition before the current date, i.e.
Definition: ucal.h:1531
UCAL_SHORT_DST
@ UCAL_SHORT_DST
Short daylight savings display name.
Definition: ucal.h:839
UCAL_SECOND
@ UCAL_SECOND
Field number indicating the second within the minute.
Definition: ucal.h:364
UCAL_FIELD_COUNT
@ UCAL_FIELD_COUNT
One more than the highest normal UCalendarDateFields value.
Definition: ucal.h:449
UCAL_WALLTIME_FIRST
@ UCAL_WALLTIME_FIRST
An ambiguous wall time to be interpreted as the earliest.
Definition: ucal.h:980
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
Definition: localpointer.h:562
UCalendarAttribute
UCalendarAttribute
Types of UCalendar attributes.
Definition: ucal.h:928
UCAL_TRADITIONAL
@ UCAL_TRADITIONAL
Despite the name, UCAL_TRADITIONAL designates the locale's default calendar, which may be the Gregori...
Definition: ucal.h:180
ucal_setTimeZone
void ucal_setTimeZone(UCalendar *cal, const UChar *zoneID, int32_t len, UErrorCode *status)
Set the TimeZone used by a UCalendar.
ucal_getCanonicalTimeZoneID
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...
UCAL_DECEMBER
@ UCAL_DECEMBER
December.
Definition: ucal.h:520
ucal_openTimeZoneIDEnumeration
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.
UCAL_FIRST_DAY_OF_WEEK
@ UCAL_FIRST_DAY_OF_WEEK
First day of week.
Definition: ucal.h:938
UCAL_REPEATED_WALL_TIME
@ UCAL_REPEATED_WALL_TIME
The behavior for handling wall time repeating multiple times at negative time zone offset transitions...
Definition: ucal.h:949
UCalendarDaysOfWeek
UCalendarDaysOfWeek
Useful constant for days of week.
Definition: ucal.h:473
UCAL_HOUR
@ UCAL_HOUR
Field number indicating the hour of the morning or afternoon.
Definition: ucal.h:339
UCAL_GREATEST_MINIMUM
@ UCAL_GREATEST_MINIMUM
Greatest minimum value.
Definition: ucal.h:1292
ucal_getTimeZoneID
int32_t ucal_getTimeZoneID(const UCalendar *cal, UChar *result, int32_t resultLength, UErrorCode *status)
Get the ID of the UCalendar's time zone.
ucal_countAvailable
int32_t ucal_countAvailable(void)
Determine how many locales have calendars available.
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
UCalendar
void * UCalendar
A calendar.
Definition: ucal.h:169
ucal_open
UCalendar * ucal_open(const UChar *zoneID, int32_t len, const char *locale, UCalendarType type, UErrorCode *status)
Open a UCalendar.
UCAL_DST
@ UCAL_DST
Daylight savings display name.
Definition: ucal.h:837
UCalendarDisplayNameType
UCalendarDisplayNameType
Possible formats for a UCalendar's display name.
Definition: ucal.h:831
UCAL_PM
@ UCAL_PM
PM.
Definition: ucal.h:538
ucal_getFieldDifference
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.
UDate
double UDate
Date and Time data type.
Definition: utypes.h:203
UCAL_WEEK_OF_YEAR
@ UCAL_WEEK_OF_YEAR
Field number indicating the week number within the current year.
Definition: ucal.h:245
ucal_getKeywordValuesForLocale
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...
UCAL_APRIL
@ UCAL_APRIL
April.
Definition: ucal.h:504
UCAL_DEFAULT
@ UCAL_DEFAULT
A better name for UCAL_TRADITIONAL.
Definition: ucal.h:185
U_DRAFT
#define U_DRAFT
This is used to declare a function as a draft public ICU C API
Definition: umachine.h:113
UCalendarMonths
UCalendarMonths
Possible months in a UCalendar.
Definition: ucal.h:496
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:111
UCAL_ZONE_TYPE_ANY
@ UCAL_ZONE_TYPE_ANY
Any system zones.
Definition: ucal.h:555
UCAL_SKIPPED_WALL_TIME
@ UCAL_SKIPPED_WALL_TIME
The behavior for handling skipped wall time at positive time zone offset transitions.
Definition: ucal.h:955
UCAL_HOUR_OF_DAY
@ UCAL_HOUR_OF_DAY
Field number indicating the hour of the day.
Definition: ucal.h:348
ucal_clear
void ucal_clear(UCalendar *calendar)
Clear all fields in a UCalendar.
ucal_clearField
void ucal_clearField(UCalendar *cal, UCalendarDateFields field)
Clear a field in a UCalendar.
UCalendarDateFields
UCalendarDateFields
Possible fields in a UCalendar.
Definition: ucal.h:199
ucal_openCountryTimeZones
UEnumeration * ucal_openCountryTimeZones(const char *country, UErrorCode *ec)
Create an enumeration over all time zones associated with the given country.
UCAL_DATE
@ UCAL_DATE
Field number indicating the day of the month.
Definition: ucal.h:269
UChar
uint16_t UChar
Definition: umachine.h:378
UCalendarType
UCalendarType
Possible types of UCalendars.
Definition: ucal.h:174
UCAL_MILLISECONDS_IN_DAY
@ UCAL_MILLISECONDS_IN_DAY
Ranges from 0 to 23:59:59.999 (regardless of DST).
Definition: ucal.h:434
UCAL_LENIENT
@ UCAL_LENIENT
Lenient parsing.
Definition: ucal.h:933
ucal_getLimit
int32_t ucal_getLimit(const UCalendar *cal, UCalendarDateFields field, UCalendarLimitType type, UErrorCode *status)
Determine a limit for a field in a UCalendar.
UEnumeration
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:43
UCAL_AM
@ UCAL_AM
AM.
Definition: ucal.h:536
UCAL_WALLTIME_NEXT_VALID
@ UCAL_WALLTIME_NEXT_VALID
An ambiguous wall time to be interpreted as the next valid wall time.
Definition: ucal.h:986
UCAL_ERA
@ UCAL_ERA
Field number indicating the era, e.g., AD or BC in the Gregorian (Julian) calendar.
Definition: ucal.h:205
UCAL_AUGUST
@ UCAL_AUGUST
August.
Definition: ucal.h:512
ucal_openTimeZones
UEnumeration * ucal_openTimeZones(UErrorCode *ec)
Create an enumeration over all time zones.
UCAL_WEEKDAY
@ UCAL_WEEKDAY
Designates a full weekday (no part of the day is included in the weekend).
Definition: ucal.h:1405
UCAL_UNDECIMBER
@ UCAL_UNDECIMBER
Value of the UCAL_MONTH field indicating the thirteenth month of the year.
Definition: ucal.h:525
UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE
@ UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE
Get the previous transition on or before the current date, i.e.
Definition: ucal.h:1537
UCAL_DOW_LOCAL
@ UCAL_DOW_LOCAL
Field number indicating the localized day of week.
Definition: ucal.h:403
USystemTimeZoneType
USystemTimeZoneType
System time zone type constants used by filtering zones in ucal_openTimeZoneIDEnumeration.
Definition: ucal.h:550
UCAL_TZ_TRANSITION_NEXT
@ UCAL_TZ_TRANSITION_NEXT
Get the next transition after the current date, i.e.
Definition: ucal.h:1519
UCAL_MAXIMUM
@ UCAL_MAXIMUM
Maximum value.
Definition: ucal.h:1290
ucal_getTimeZoneTransitionDate
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,...
uenum.h
C API: String Enumeration.
UCAL_THURSDAY
@ UCAL_THURSDAY
Thursday.
Definition: ucal.h:483
UCAL_SEPTEMBER
@ UCAL_SEPTEMBER
September.
Definition: ucal.h:514
UCAL_ACTUAL_MINIMUM
@ UCAL_ACTUAL_MINIMUM
Actual minimum value.
Definition: ucal.h:1296