ICU 52.1  52.1
ucal.h
Go to the documentation of this file.
1 /*
2  *******************************************************************************
3  * Copyright (C) 1996-2013, International Business Machines Corporation and
4  * others. All Rights Reserved.
5  *******************************************************************************
6  */
7 
8 #ifndef UCAL_H
9 #define UCAL_H
10 
11 #include "unicode/utypes.h"
12 #include "unicode/uenum.h"
13 #include "unicode/uloc.h"
14 #include "unicode/localpointer.h"
15 
16 #if !UCONFIG_NO_FORMATTING
17 
147 #define UCAL_UNKNOWN_ZONE_ID "Etc/Unknown"
148 
153 typedef void* UCalendar;
154 
175 };
176 
179 
190 
196 
217 
230 
245 
254 
261 
277 
302 
313 
324 
333 
341 
349 
357 
364 
371 
380 
388 
396 
408 
419 
425 
431 
441 };
442 
468 };
469 
472 
506 };
507 
510 
519 };
520 
523 
546 };
547 
550 
567 U_STABLE UEnumeration* U_EXPORT2
568 ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* region,
569  const int32_t* rawOffset, UErrorCode* ec);
570 
582 U_STABLE UEnumeration* U_EXPORT2
584 
601 U_STABLE UEnumeration* U_EXPORT2
602 ucal_openCountryTimeZones(const char* country, UErrorCode* ec);
603 
620 U_STABLE int32_t U_EXPORT2
621 ucal_getDefaultTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec);
622 
632 U_STABLE void U_EXPORT2
633 ucal_setDefaultTimeZone(const UChar* zoneID, UErrorCode* ec);
634 
651 U_STABLE int32_t U_EXPORT2
652 ucal_getDSTSavings(const UChar* zoneID, UErrorCode* ec);
653 
660 U_STABLE UDate U_EXPORT2
661 ucal_getNow(void);
662 
686 U_STABLE UCalendar* U_EXPORT2
687 ucal_open(const UChar* zoneID,
688  int32_t len,
689  const char* locale,
690  UCalendarType type,
691  UErrorCode* status);
692 
699 U_STABLE void U_EXPORT2
700 ucal_close(UCalendar *cal);
701 
702 #if U_SHOW_CPLUSPLUS_API
703 
705 
716 
718 
719 #endif
720 
729 U_STABLE UCalendar* U_EXPORT2
730 ucal_clone(const UCalendar* cal,
731  UErrorCode* status);
732 
742 U_STABLE void U_EXPORT2
744  const UChar* zoneID,
745  int32_t len,
746  UErrorCode* status);
747 
748 #ifndef U_HIDE_DRAFT_API
749 
759 U_DRAFT int32_t U_EXPORT2
760 ucal_getTimeZoneID(const UCalendar *cal,
761  UChar *result,
762  int32_t resultLength,
763  UErrorCode *status);
764 #endif /* U_HIDE_DRAFT_API */
765 
779 };
780 
783 
797 U_STABLE int32_t U_EXPORT2
800  const char* locale,
801  UChar* result,
802  int32_t resultLength,
803  UErrorCode* status);
804 
813 U_STABLE UBool U_EXPORT2
814 ucal_inDaylightTime(const UCalendar* cal,
815  UErrorCode* status );
816 
837 U_STABLE void U_EXPORT2
838 ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode);
839 
860 U_STABLE UDate U_EXPORT2
861 ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode);
862 
895 };
896 
899 
926 };
929 
941 U_STABLE int32_t U_EXPORT2
942 ucal_getAttribute(const UCalendar* cal,
943  UCalendarAttribute attr);
944 
956 U_STABLE void U_EXPORT2
958  UCalendarAttribute attr,
959  int32_t newValue);
960 
970 U_STABLE const char* U_EXPORT2
971 ucal_getAvailable(int32_t localeIndex);
972 
981 U_STABLE int32_t U_EXPORT2
982 ucal_countAvailable(void);
983 
995 U_STABLE UDate U_EXPORT2
996 ucal_getMillis(const UCalendar* cal,
997  UErrorCode* status);
998 
1010 U_STABLE void U_EXPORT2
1012  UDate dateTime,
1013  UErrorCode* status );
1014 
1029 U_STABLE void U_EXPORT2
1030 ucal_setDate(UCalendar* cal,
1031  int32_t year,
1032  int32_t month,
1033  int32_t date,
1034  UErrorCode* status);
1035 
1053 U_STABLE void U_EXPORT2
1055  int32_t year,
1056  int32_t month,
1057  int32_t date,
1058  int32_t hour,
1059  int32_t minute,
1060  int32_t second,
1061  UErrorCode* status);
1062 
1072 U_STABLE UBool U_EXPORT2
1073 ucal_equivalentTo(const UCalendar* cal1,
1074  const UCalendar* cal2);
1075 
1094 U_STABLE void U_EXPORT2
1095 ucal_add(UCalendar* cal,
1096  UCalendarDateFields field,
1097  int32_t amount,
1098  UErrorCode* status);
1099 
1124 U_STABLE void U_EXPORT2
1125 ucal_roll(UCalendar* cal,
1126  UCalendarDateFields field,
1127  int32_t amount,
1128  UErrorCode* status);
1129 
1146 U_STABLE int32_t U_EXPORT2
1147 ucal_get(const UCalendar* cal,
1148  UCalendarDateFields field,
1149  UErrorCode* status );
1150 
1166 U_STABLE void U_EXPORT2
1167 ucal_set(UCalendar* cal,
1168  UCalendarDateFields field,
1169  int32_t value);
1170 
1186 U_STABLE UBool U_EXPORT2
1187 ucal_isSet(const UCalendar* cal,
1188  UCalendarDateFields field);
1189 
1204 U_STABLE void U_EXPORT2
1206  UCalendarDateFields field);
1207 
1218 U_STABLE void U_EXPORT2
1219 ucal_clear(UCalendar* calendar);
1220 
1238 };
1239 
1242 
1257 U_STABLE int32_t U_EXPORT2
1258 ucal_getLimit(const UCalendar* cal,
1259  UCalendarDateFields field,
1260  UCalendarLimitType type,
1261  UErrorCode* status);
1262 
1270 U_STABLE const char * U_EXPORT2
1271 ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode* status);
1272 
1279 U_STABLE const char * U_EXPORT2
1281 
1300 U_STABLE int32_t U_EXPORT2
1301 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
1302  UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status);
1310 U_STABLE const char * U_EXPORT2
1311 ucal_getType(const UCalendar *cal, UErrorCode* status);
1312 
1329 U_STABLE UEnumeration* U_EXPORT2
1330 ucal_getKeywordValuesForLocale(const char* key,
1331  const char* locale,
1332  UBool commonlyUsed,
1333  UErrorCode* status);
1334 
1335 
1362 };
1363 
1366 
1385 ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status);
1386 
1402 U_STABLE int32_t U_EXPORT2
1403 ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status);
1404 
1415 U_STABLE UBool U_EXPORT2
1416 ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
1417 
1442 U_STABLE int32_t U_EXPORT2
1444  UDate target,
1445  UCalendarDateFields field,
1446  UErrorCode* status);
1447 
1477 };
1478 
1496 U_DRAFT UBool U_EXPORT2
1498  UDate* transition, UErrorCode* status);
1499 
1500 #ifndef U_HIDE_DRAFT_API
1501 
1525 U_DRAFT int32_t U_EXPORT2
1526 ucal_getWindowsTimeZoneID(const UChar* id, int32_t len,
1527  UChar* winid, int32_t winidCapacity, UErrorCode* status);
1528 
1557 U_DRAFT int32_t U_EXPORT2
1558 ucal_getTimeZoneIDForWindowsID(const UChar* winid, int32_t len, const char* region,
1559  UChar* id, int32_t idCapacity, UErrorCode* status);
1560 
1561 #endif /* U_HIDE_DRAFT_API */
1562 
1563 #endif /* #if !UCONFIG_NO_FORMATTING */
1564 
1565 #endif