ICU 56.1  56.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ucal.h
Go to the documentation of this file.
1 /*
2  *******************************************************************************
3  * Copyright (C) 1996-2015, 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 
758 U_STABLE int32_t U_EXPORT2
759 ucal_getTimeZoneID(const UCalendar *cal,
760  UChar *result,
761  int32_t resultLength,
762  UErrorCode *status);
763 
777 };
778 
781 
795 U_STABLE int32_t U_EXPORT2
798  const char* locale,
799  UChar* result,
800  int32_t resultLength,
801  UErrorCode* status);
802 
811 U_STABLE UBool U_EXPORT2
812 ucal_inDaylightTime(const UCalendar* cal,
813  UErrorCode* status );
814 
835 U_STABLE void U_EXPORT2
836 ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode);
837 
858 U_STABLE UDate U_EXPORT2
859 ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode);
860 
893 };
894 
897 
924 };
927 
939 U_STABLE int32_t U_EXPORT2
940 ucal_getAttribute(const UCalendar* cal,
941  UCalendarAttribute attr);
942 
954 U_STABLE void U_EXPORT2
956  UCalendarAttribute attr,
957  int32_t newValue);
958 
968 U_STABLE const char* U_EXPORT2
969 ucal_getAvailable(int32_t localeIndex);
970 
979 U_STABLE int32_t U_EXPORT2
980 ucal_countAvailable(void);
981 
993 U_STABLE UDate U_EXPORT2
994 ucal_getMillis(const UCalendar* cal,
995  UErrorCode* status);
996 
1008 U_STABLE void U_EXPORT2
1010  UDate dateTime,
1011  UErrorCode* status );
1012 
1027 U_STABLE void U_EXPORT2
1028 ucal_setDate(UCalendar* cal,
1029  int32_t year,
1030  int32_t month,
1031  int32_t date,
1032  UErrorCode* status);
1033 
1051 U_STABLE void U_EXPORT2
1053  int32_t year,
1054  int32_t month,
1055  int32_t date,
1056  int32_t hour,
1057  int32_t minute,
1058  int32_t second,
1059  UErrorCode* status);
1060 
1070 U_STABLE UBool U_EXPORT2
1071 ucal_equivalentTo(const UCalendar* cal1,
1072  const UCalendar* cal2);
1073 
1092 U_STABLE void U_EXPORT2
1093 ucal_add(UCalendar* cal,
1094  UCalendarDateFields field,
1095  int32_t amount,
1096  UErrorCode* status);
1097 
1122 U_STABLE void U_EXPORT2
1123 ucal_roll(UCalendar* cal,
1124  UCalendarDateFields field,
1125  int32_t amount,
1126  UErrorCode* status);
1127 
1144 U_STABLE int32_t U_EXPORT2
1145 ucal_get(const UCalendar* cal,
1146  UCalendarDateFields field,
1147  UErrorCode* status );
1148 
1164 U_STABLE void U_EXPORT2
1165 ucal_set(UCalendar* cal,
1166  UCalendarDateFields field,
1167  int32_t value);
1168 
1184 U_STABLE UBool U_EXPORT2
1185 ucal_isSet(const UCalendar* cal,
1186  UCalendarDateFields field);
1187 
1202 U_STABLE void U_EXPORT2
1204  UCalendarDateFields field);
1205 
1216 U_STABLE void U_EXPORT2
1217 ucal_clear(UCalendar* calendar);
1218 
1236 };
1237 
1240 
1255 U_STABLE int32_t U_EXPORT2
1256 ucal_getLimit(const UCalendar* cal,
1257  UCalendarDateFields field,
1258  UCalendarLimitType type,
1259  UErrorCode* status);
1260 
1268 U_STABLE const char * U_EXPORT2
1269 ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode* status);
1270 
1277 U_STABLE const char * U_EXPORT2
1279 
1298 U_STABLE int32_t U_EXPORT2
1299 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
1300  UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status);
1308 U_STABLE const char * U_EXPORT2
1309 ucal_getType(const UCalendar *cal, UErrorCode* status);
1310 
1327 U_STABLE UEnumeration* U_EXPORT2
1328 ucal_getKeywordValuesForLocale(const char* key,
1329  const char* locale,
1330  UBool commonlyUsed,
1331  UErrorCode* status);
1332 
1333 
1360 };
1361 
1364 
1383 ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status);
1384 
1400 U_STABLE int32_t U_EXPORT2
1401 ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status);
1402 
1413 U_STABLE UBool U_EXPORT2
1414 ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
1415 
1440 U_STABLE int32_t U_EXPORT2
1442  UDate target,
1443  UCalendarDateFields field,
1444  UErrorCode* status);
1445 
1475 };
1476 
1494 U_STABLE UBool U_EXPORT2
1496  UDate* transition, UErrorCode* status);
1497 
1522 U_STABLE int32_t U_EXPORT2
1523 ucal_getWindowsTimeZoneID(const UChar* id, int32_t len,
1524  UChar* winid, int32_t winidCapacity, UErrorCode* status);
1525 
1554 U_STABLE int32_t U_EXPORT2
1555 ucal_getTimeZoneIDForWindowsID(const UChar* winid, int32_t len, const char* region,
1556  UChar* id, int32_t idCapacity, UErrorCode* status);
1557 
1558 #endif /* #if !UCONFIG_NO_FORMATTING */
1559 
1560 #endif