ICU 4.8.1.1  4.8.1.1
 All Data Structures 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-2011, 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 
568 ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* region,
569  const int32_t* rawOffset, UErrorCode* ec);
570 
584 
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 
661 ucal_getNow(void);
662 
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 
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 
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 
843 ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode);
844 
856 };
857 
860 
872 U_STABLE int32_t U_EXPORT2
873 ucal_getAttribute(const UCalendar* cal,
874  UCalendarAttribute attr);
875 
887 U_STABLE void U_EXPORT2
889  UCalendarAttribute attr,
890  int32_t newValue);
891 
901 U_STABLE const char* U_EXPORT2
902 ucal_getAvailable(int32_t localeIndex);
903 
912 U_STABLE int32_t U_EXPORT2
913 ucal_countAvailable(void);
914 
927 ucal_getMillis(const UCalendar* cal,
928  UErrorCode* status);
929 
941 U_STABLE void U_EXPORT2
943  UDate dateTime,
944  UErrorCode* status );
945 
960 U_STABLE void U_EXPORT2
962  int32_t year,
963  int32_t month,
964  int32_t date,
965  UErrorCode* status);
966 
984 U_STABLE void U_EXPORT2
986  int32_t year,
987  int32_t month,
988  int32_t date,
989  int32_t hour,
990  int32_t minute,
991  int32_t second,
992  UErrorCode* status);
993 
1004 ucal_equivalentTo(const UCalendar* cal1,
1005  const UCalendar* cal2);
1006 
1022 U_STABLE void U_EXPORT2
1023 ucal_add(UCalendar* cal,
1024  UCalendarDateFields field,
1025  int32_t amount,
1026  UErrorCode* status);
1027 
1043 U_STABLE void U_EXPORT2
1044 ucal_roll(UCalendar* cal,
1045  UCalendarDateFields field,
1046  int32_t amount,
1047  UErrorCode* status);
1048 
1065 U_STABLE int32_t U_EXPORT2
1066 ucal_get(const UCalendar* cal,
1067  UCalendarDateFields field,
1068  UErrorCode* status );
1069 
1085 U_STABLE void U_EXPORT2
1086 ucal_set(UCalendar* cal,
1087  UCalendarDateFields field,
1088  int32_t value);
1089 
1106 ucal_isSet(const UCalendar* cal,
1107  UCalendarDateFields field);
1108 
1123 U_STABLE void U_EXPORT2
1125  UCalendarDateFields field);
1126 
1137 U_STABLE void U_EXPORT2
1138 ucal_clear(UCalendar* calendar);
1139 
1157 };
1158 
1161 
1176 U_STABLE int32_t U_EXPORT2
1177 ucal_getLimit(const UCalendar* cal,
1178  UCalendarDateFields field,
1179  UCalendarLimitType type,
1180  UErrorCode* status);
1181 
1189 U_STABLE const char * U_EXPORT2
1190 ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode* status);
1191 
1198 U_STABLE const char * U_EXPORT2
1200 
1219 U_STABLE int32_t U_EXPORT2
1220 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
1221  UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status);
1229 U_STABLE const char * U_EXPORT2
1230 ucal_getType(const UCalendar *cal, UErrorCode* status);
1231 
1249 ucal_getKeywordValuesForLocale(const char* key,
1250  const char* locale,
1251  UBool commonlyUsed,
1252  UErrorCode* status);
1253 
1254 
1281 };
1282 
1285 
1303 ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status);
1304 
1320 U_STABLE int32_t U_EXPORT2
1321 ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status);
1322 
1334 ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
1335 
1360 U_DRAFT int32_t U_EXPORT2
1362  UDate target,
1363  UCalendarDateFields field,
1364  UErrorCode* status);
1365 
1366 
1367 #endif /* #if !UCONFIG_NO_FORMATTING */
1368 
1369 #endif