ICU 50.1.2  50.1.2
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_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 
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 
1082 U_STABLE void U_EXPORT2
1083 ucal_add(UCalendar* cal,
1084  UCalendarDateFields field,
1085  int32_t amount,
1086  UErrorCode* status);
1087 
1112 U_STABLE void U_EXPORT2
1113 ucal_roll(UCalendar* cal,
1114  UCalendarDateFields field,
1115  int32_t amount,
1116  UErrorCode* status);
1117 
1134 U_STABLE int32_t U_EXPORT2
1135 ucal_get(const UCalendar* cal,
1136  UCalendarDateFields field,
1137  UErrorCode* status );
1138 
1154 U_STABLE void U_EXPORT2
1155 ucal_set(UCalendar* cal,
1156  UCalendarDateFields field,
1157  int32_t value);
1158 
1174 U_STABLE UBool U_EXPORT2
1175 ucal_isSet(const UCalendar* cal,
1176  UCalendarDateFields field);
1177 
1192 U_STABLE void U_EXPORT2
1194  UCalendarDateFields field);
1195 
1206 U_STABLE void U_EXPORT2
1207 ucal_clear(UCalendar* calendar);
1208 
1226 };
1227 
1230 
1245 U_STABLE int32_t U_EXPORT2
1246 ucal_getLimit(const UCalendar* cal,
1247  UCalendarDateFields field,
1248  UCalendarLimitType type,
1249  UErrorCode* status);
1250 
1258 U_STABLE const char * U_EXPORT2
1259 ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode* status);
1260 
1267 U_STABLE const char * U_EXPORT2
1269 
1288 U_STABLE int32_t U_EXPORT2
1289 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
1290  UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status);
1298 U_STABLE const char * U_EXPORT2
1299 ucal_getType(const UCalendar *cal, UErrorCode* status);
1300 
1317 U_STABLE UEnumeration* U_EXPORT2
1318 ucal_getKeywordValuesForLocale(const char* key,
1319  const char* locale,
1320  UBool commonlyUsed,
1321  UErrorCode* status);
1322 
1323 
1350 };
1351 
1354 
1372 ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status);
1373 
1389 U_STABLE int32_t U_EXPORT2
1390 ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status);
1391 
1402 U_STABLE UBool U_EXPORT2
1403 ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
1404 
1429 U_STABLE int32_t U_EXPORT2
1431  UDate target,
1432  UCalendarDateFields field,
1433  UErrorCode* status);
1434 
1435 #ifndef U_HIDE_DRAFT_API
1436 
1465 };
1466 
1469 
1485 U_DRAFT UBool U_EXPORT2
1487  UDate* transition, UErrorCode* status);
1488 
1489 #endif /* U_HIDE_DRAFT_API */
1490 
1491 #endif /* #if !UCONFIG_NO_FORMATTING */
1492 
1493 #endif