ICU 49.1.1  49.1.1
ucal.h
Go to the documentation of this file.
1 /*
2  *******************************************************************************
3  * Copyright (C) 1996-2012, 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_DRAFT 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 
715 U_DEFINE_LOCAL_OPEN_POINTER(LocalUCalendarPointer, UCalendar, ucal_close);
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 
761 };
762 
765 
779 U_STABLE int32_t U_EXPORT2
782  const char* locale,
783  UChar* result,
784  int32_t resultLength,
785  UErrorCode* status);
786 
795 U_STABLE UBool U_EXPORT2
796 ucal_inDaylightTime(const UCalendar* cal,
797  UErrorCode* status );
798 
819 U_STABLE void U_EXPORT2
820 ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode);
821 
842 U_STABLE UDate U_EXPORT2
843 ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode);
844 
865 #ifndef U_HIDE_DRAFT_API
866  ,
879 #endif /* U_HIDE_DRAFT_API */
880 };
881 
884 
898 #ifndef U_HIDE_DRAFT_API
899  ,
913 #endif /* U_HIDE_DRAFT_API */
914 };
917 
929 U_STABLE int32_t U_EXPORT2
930 ucal_getAttribute(const UCalendar* cal,
931  UCalendarAttribute attr);
932 
944 U_STABLE void U_EXPORT2
946  UCalendarAttribute attr,
947  int32_t newValue);
948 
958 U_STABLE const char* U_EXPORT2
959 ucal_getAvailable(int32_t localeIndex);
960 
969 U_STABLE int32_t U_EXPORT2
970 ucal_countAvailable(void);
971 
983 U_STABLE UDate U_EXPORT2
984 ucal_getMillis(const UCalendar* cal,
985  UErrorCode* status);
986 
998 U_STABLE void U_EXPORT2
1000  UDate dateTime,
1001  UErrorCode* status );
1002 
1017 U_STABLE void U_EXPORT2
1018 ucal_setDate(UCalendar* cal,
1019  int32_t year,
1020  int32_t month,
1021  int32_t date,
1022  UErrorCode* status);
1023 
1041 U_STABLE void U_EXPORT2
1043  int32_t year,
1044  int32_t month,
1045  int32_t date,
1046  int32_t hour,
1047  int32_t minute,
1048  int32_t second,
1049  UErrorCode* status);
1050 
1060 U_STABLE UBool U_EXPORT2
1061 ucal_equivalentTo(const UCalendar* cal1,
1062  const UCalendar* cal2);
1063 
1079 U_STABLE void U_EXPORT2
1080 ucal_add(UCalendar* cal,
1081  UCalendarDateFields field,
1082  int32_t amount,
1083  UErrorCode* status);
1084 
1100 U_STABLE void U_EXPORT2
1101 ucal_roll(UCalendar* cal,
1102  UCalendarDateFields field,
1103  int32_t amount,
1104  UErrorCode* status);
1105 
1122 U_STABLE int32_t U_EXPORT2
1123 ucal_get(const UCalendar* cal,
1124  UCalendarDateFields field,
1125  UErrorCode* status );
1126 
1142 U_STABLE void U_EXPORT2
1143 ucal_set(UCalendar* cal,
1144  UCalendarDateFields field,
1145  int32_t value);
1146 
1162 U_STABLE UBool U_EXPORT2
1163 ucal_isSet(const UCalendar* cal,
1164  UCalendarDateFields field);
1165 
1180 U_STABLE void U_EXPORT2
1182  UCalendarDateFields field);
1183 
1194 U_STABLE void U_EXPORT2
1195 ucal_clear(UCalendar* calendar);
1196 
1214 };
1215 
1218 
1233 U_STABLE int32_t U_EXPORT2
1234 ucal_getLimit(const UCalendar* cal,
1235  UCalendarDateFields field,
1236  UCalendarLimitType type,
1237  UErrorCode* status);
1238 
1246 U_STABLE const char * U_EXPORT2
1247 ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode* status);
1248 
1255 U_STABLE const char * U_EXPORT2
1257 
1276 U_STABLE int32_t U_EXPORT2
1277 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
1278  UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status);
1286 U_STABLE const char * U_EXPORT2
1287 ucal_getType(const UCalendar *cal, UErrorCode* status);
1288 
1305 U_STABLE UEnumeration* U_EXPORT2
1306 ucal_getKeywordValuesForLocale(const char* key,
1307  const char* locale,
1308  UBool commonlyUsed,
1309  UErrorCode* status);
1310 
1311 
1338 };
1339 
1342 
1360 ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status);
1361 
1377 U_STABLE int32_t U_EXPORT2
1378 ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status);
1379 
1390 U_STABLE UBool U_EXPORT2
1391 ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
1392 
1417 U_DRAFT int32_t U_EXPORT2
1419  UDate target,
1420  UCalendarDateFields field,
1421  UErrorCode* status);
1422 
1423 #endif /* #if !UCONFIG_NO_FORMATTING */
1424 
1425 #endif