ICU 63.1 63.1

ucal.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 * Copyright (C) 1996-2015, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 *******************************************************************************
8 */
9
10 #ifndef UCAL_H
11 #define UCAL_H
12
13 #include "unicode/utypes.h"
14 #include "unicode/uenum.h"
15 #include "unicode/uloc.h"
16 #include "unicode/localpointer.h"
17
18 #if !UCONFIG_NO_FORMATTING
19
162 #define UCAL_UNKNOWN_ZONE_ID "Etc/Unknown"
163
168 typedef void* UCalendar;
169
173 enum UCalendarType {
179 UCAL_TRADITIONAL,
184 UCAL_DEFAULT = UCAL_TRADITIONAL,
189 UCAL_GREGORIAN
190 };
191
193 typedef enum UCalendarType UCalendarType;
194
198 enum UCalendarDateFields {
204 UCAL_ERA,
205
210 UCAL_YEAR,
211
231 UCAL_MONTH,
232
244 UCAL_WEEK_OF_YEAR,
245
259 UCAL_WEEK_OF_MONTH,
260
268 UCAL_DATE,
269
275 UCAL_DAY_OF_YEAR,
276
291 UCAL_DAY_OF_WEEK,
292
316 UCAL_DAY_OF_WEEK_IN_MONTH,
317
327 UCAL_AM_PM,
328
338 UCAL_HOUR,
339
347 UCAL_HOUR_OF_DAY,
348
355 UCAL_MINUTE,
356
363 UCAL_SECOND,
364
371 UCAL_MILLISECOND,
372
378 UCAL_ZONE_OFFSET,
379
385 UCAL_DST_OFFSET,
386
394 UCAL_YEAR_WOY,
395
402 UCAL_DOW_LOCAL,
403
410 UCAL_EXTENDED_YEAR,
411
422 UCAL_JULIAN_DAY,
423
433 UCAL_MILLISECONDS_IN_DAY,
434
439 UCAL_IS_LEAP_MONTH,
440
441 /* Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
442 * it is needed for layout of Calendar, DateFormat, and other objects */
447 UCAL_FIELD_COUNT,
448
457 UCAL_DAY_OF_MONTH=UCAL_DATE
458 };
459
461 typedef enum UCalendarDateFields UCalendarDateFields;
470 enum UCalendarDaysOfWeek {
472 UCAL_SUNDAY = 1,
474 UCAL_MONDAY,
476 UCAL_TUESDAY,
478 UCAL_WEDNESDAY,
480 UCAL_THURSDAY,
482 UCAL_FRIDAY,
484 UCAL_SATURDAY
485 };
486
488 typedef enum UCalendarDaysOfWeek UCalendarDaysOfWeek;
489
493 enum UCalendarMonths {
495 UCAL_JANUARY,
497 UCAL_FEBRUARY,
499 UCAL_MARCH,
501 UCAL_APRIL,
503 UCAL_MAY,
505 UCAL_JUNE,
507 UCAL_JULY,
509 UCAL_AUGUST,
511 UCAL_SEPTEMBER,
513 UCAL_OCTOBER,
515 UCAL_NOVEMBER,
517 UCAL_DECEMBER,
522 UCAL_UNDECIMBER
523 };
524
526 typedef enum UCalendarMonths UCalendarMonths;
527
531 enum UCalendarAMPMs {
533 UCAL_AM,
535 UCAL_PM
536 };
537
539 typedef enum UCalendarAMPMs UCalendarAMPMs;
540
547 enum USystemTimeZoneType {
552 UCAL_ZONE_TYPE_ANY,
557 UCAL_ZONE_TYPE_CANONICAL,
562 UCAL_ZONE_TYPE_CANONICAL_LOCATION
563 };
564
566 typedef enum USystemTimeZoneType USystemTimeZoneType;
567
584 U_STABLE UEnumeration* U_EXPORT2
585 ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char* region,
586 const int32_t* rawOffset, UErrorCode* ec);
587
599 U_STABLE UEnumeration* U_EXPORT2
600 ucal_openTimeZones(UErrorCode* ec);
601
618 U_STABLE UEnumeration* U_EXPORT2
619 ucal_openCountryTimeZones(const char* country, UErrorCode* ec);
620
637 U_STABLE int32_t U_EXPORT2
638 ucal_getDefaultTimeZone(UChar* result, int32_t resultCapacity, UErrorCode* ec);
639
649 U_STABLE void U_EXPORT2
650 ucal_setDefaultTimeZone(const UChar* zoneID, UErrorCode* ec);
651
668 U_STABLE int32_t U_EXPORT2
669 ucal_getDSTSavings(const UChar* zoneID, UErrorCode* ec);
670
677 U_STABLE UDate U_EXPORT2
678 ucal_getNow(void);
679
703 U_STABLE UCalendar* U_EXPORT2
704 ucal_open(const UChar* zoneID,
705 int32_t len,
706 const char* locale,
707 UCalendarType type,
708 UErrorCode* status);
709
716 U_STABLE void U_EXPORT2
717 ucal_close(UCalendar *cal);
718
719 #if U_SHOW_CPLUSPLUS_API
720
721 U_NAMESPACE_BEGIN
722
732 U_DEFINE_LOCAL_OPEN_POINTER(LocalUCalendarPointer, UCalendar, ucal_close);
733
734 U_NAMESPACE_END
735
736 #endif
737
746 U_STABLE UCalendar* U_EXPORT2
747 ucal_clone(const UCalendar* cal,
748 UErrorCode* status);
749
759 U_STABLE void U_EXPORT2
760 ucal_setTimeZone(UCalendar* cal,
761 const UChar* zoneID,
762 int32_t len,
763 UErrorCode* status);
764
775 U_STABLE int32_t U_EXPORT2
776 ucal_getTimeZoneID(const UCalendar *cal,
777 UChar *result,
778 int32_t resultLength,
779 UErrorCode *status);
780
785 enum UCalendarDisplayNameType {
787 UCAL_STANDARD,
789 UCAL_SHORT_STANDARD,
791 UCAL_DST,
793 UCAL_SHORT_DST
794 };
795
797 typedef enum UCalendarDisplayNameType UCalendarDisplayNameType;
798
812 U_STABLE int32_t U_EXPORT2
813 ucal_getTimeZoneDisplayName(const UCalendar* cal,
814 UCalendarDisplayNameType type,
815 const char* locale,
816 UChar* result,
817 int32_t resultLength,
818 UErrorCode* status);
819
828 U_STABLE UBool U_EXPORT2
829 ucal_inDaylightTime(const UCalendar* cal,
830 UErrorCode* status );
831
852 U_STABLE void U_EXPORT2
853 ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode);
854
875 U_STABLE UDate U_EXPORT2
876 ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode);
877
882 enum UCalendarAttribute {
887 UCAL_LENIENT,
892 UCAL_FIRST_DAY_OF_WEEK,
897 UCAL_MINIMAL_DAYS_IN_FIRST_WEEK,
903 UCAL_REPEATED_WALL_TIME,
909 UCAL_SKIPPED_WALL_TIME
910 };
911
913 typedef enum UCalendarAttribute UCalendarAttribute;
914
920 enum UCalendarWallTimeOption {
927 UCAL_WALLTIME_LAST,
934 UCAL_WALLTIME_FIRST,
940 UCAL_WALLTIME_NEXT_VALID
941 };
943 typedef enum UCalendarWallTimeOption UCalendarWallTimeOption;
944
956 U_STABLE int32_t U_EXPORT2
957 ucal_getAttribute(const UCalendar* cal,
958 UCalendarAttribute attr);
959
971 U_STABLE void U_EXPORT2
972 ucal_setAttribute(UCalendar* cal,
973 UCalendarAttribute attr,
974 int32_t newValue);
975
985 U_STABLE const char* U_EXPORT2
986 ucal_getAvailable(int32_t localeIndex);
987
996 U_STABLE int32_t U_EXPORT2
997 ucal_countAvailable(void);
998
1010 U_STABLE UDate U_EXPORT2
1011 ucal_getMillis(const UCalendar* cal,
1012 UErrorCode* status);
1013
1025 U_STABLE void U_EXPORT2
1026 ucal_setMillis(UCalendar* cal,
1027 UDate dateTime,
1028 UErrorCode* status );
1029
1044 U_STABLE void U_EXPORT2
1045 ucal_setDate(UCalendar* cal,
1046 int32_t year,
1047 int32_t month,
1048 int32_t date,
1049 UErrorCode* status);
1050
1068 U_STABLE void U_EXPORT2
1069 ucal_setDateTime(UCalendar* cal,
1070 int32_t year,
1071 int32_t month,
1072 int32_t date,
1073 int32_t hour,
1074 int32_t minute,
1075 int32_t second,
1076 UErrorCode* status);
1077
1087 U_STABLE UBool U_EXPORT2
1088 ucal_equivalentTo(const UCalendar* cal1,
1089 const UCalendar* cal2);
1090
1109 U_STABLE void U_EXPORT2
1110 ucal_add(UCalendar* cal,
1111 UCalendarDateFields field,
1112 int32_t amount,
1113 UErrorCode* status);
1114
1139 U_STABLE void U_EXPORT2
1140 ucal_roll(UCalendar* cal,
1141 UCalendarDateFields field,
1142 int32_t amount,
1143 UErrorCode* status);
1144
1161 U_STABLE int32_t U_EXPORT2
1162 ucal_get(const UCalendar* cal,
1163 UCalendarDateFields field,
1164 UErrorCode* status );
1165
1181 U_STABLE void U_EXPORT2
1182 ucal_set(UCalendar* cal,
1183 UCalendarDateFields field,
1184 int32_t value);
1185
1201 U_STABLE UBool U_EXPORT2
1202 ucal_isSet(const UCalendar* cal,
1203 UCalendarDateFields field);
1204
1219 U_STABLE void U_EXPORT2
1220 ucal_clearField(UCalendar* cal,
1221 UCalendarDateFields field);
1222
1233 U_STABLE void U_EXPORT2
1234 ucal_clear(UCalendar* calendar);
1235
1240 enum UCalendarLimitType {
1242 UCAL_MINIMUM,
1244 UCAL_MAXIMUM,
1246 UCAL_GREATEST_MINIMUM,
1248 UCAL_LEAST_MAXIMUM,
1250 UCAL_ACTUAL_MINIMUM,
1252 UCAL_ACTUAL_MAXIMUM
1253 };
1254
1256 typedef enum UCalendarLimitType UCalendarLimitType;
1257
1272 U_STABLE int32_t U_EXPORT2
1273 ucal_getLimit(const UCalendar* cal,
1274 UCalendarDateFields field,
1275 UCalendarLimitType type,
1276 UErrorCode* status);
1277
1285 U_STABLE const char * U_EXPORT2
1286 ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode* status);
1287
1294 U_STABLE const char * U_EXPORT2
1295 ucal_getTZDataVersion(UErrorCode* status);
1296
1315 U_STABLE int32_t U_EXPORT2
1316 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
1317 UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status);
1325 U_STABLE const char * U_EXPORT2
1326 ucal_getType(const UCalendar *cal, UErrorCode* status);
1327
1344 U_STABLE UEnumeration* U_EXPORT2
1345 ucal_getKeywordValuesForLocale(const char* key,
1346 const char* locale,
1347 UBool commonlyUsed,
1348 UErrorCode* status);
1349
1350
1354 enum UCalendarWeekdayType {
1359 UCAL_WEEKDAY,
1364 UCAL_WEEKEND,
1370 UCAL_WEEKEND_ONSET,
1376 UCAL_WEEKEND_CEASE
1377 };
1378
1380 typedef enum UCalendarWeekdayType UCalendarWeekdayType;
1381
1399 U_STABLE UCalendarWeekdayType U_EXPORT2
1400 ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode* status);
1401
1417 U_STABLE int32_t U_EXPORT2
1418 ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status);
1419
1430 U_STABLE UBool U_EXPORT2
1431 ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status);
1432
1457 U_STABLE int32_t U_EXPORT2
1458 ucal_getFieldDifference(UCalendar* cal,
1459 UDate target,
1460 UCalendarDateFields field,
1461 UErrorCode* status);
1462
1467 enum UTimeZoneTransitionType {
1473 UCAL_TZ_TRANSITION_NEXT,
1479 UCAL_TZ_TRANSITION_NEXT_INCLUSIVE,
1485 UCAL_TZ_TRANSITION_PREVIOUS,
1491 UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE
1492 };
1493
1494 typedef enum UTimeZoneTransitionType UTimeZoneTransitionType;
1511 U_STABLE UBool U_EXPORT2
1512 ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType type,
1513 UDate* transition, UErrorCode* status);
1514
1539 U_STABLE int32_t U_EXPORT2
1540 ucal_getWindowsTimeZoneID(const UChar* id, int32_t len,
1541 UChar* winid, int32_t winidCapacity, UErrorCode* status);
1542
1571 U_STABLE int32_t U_EXPORT2
1572 ucal_getTimeZoneIDForWindowsID(const UChar* winid, int32_t len, const char* region,
1573 UChar* id, int32_t idCapacity, UErrorCode* status);
1574
1575 #endif /* #if !UCONFIG_NO_FORMATTING */
1576
1577 #endif
ucal_clone
UCalendar * ucal_clone(const UCalendar *cal, UErrorCode *status)
Open a copy of a UCalendar.
UCAL_DEFAULT
A better name for UCAL_TRADITIONAL.
Definition: ucal.h:184
UCalendar
void * UCalendar
A calendar.
Definition: ucal.h:168
UCAL_DAY_OF_YEAR
Field number indicating the day number within the current year.
Definition: ucal.h:275
UCAL_AUGUST
August.
Definition: ucal.h:509
UCAL_MAY
May.
Definition: ucal.h:503
UCAL_SHORT_STANDARD
Short standard display name.
Definition: ucal.h:789
UCalendarDateFields
UCalendarDateFields
Possible fields in a UCalendar.
Definition: ucal.h:198
ucal_setGregorianChange
void ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode)
Sets the GregorianCalendar change date.
UCAL_DATE
Field number indicating the day of the month.
Definition: ucal.h:268
ucal_clear
void ucal_clear(UCalendar *calendar)
Clear all fields in a UCalendar.
UCAL_MILLISECONDS_IN_DAY
Ranges from 0 to 23:59:59.999 (regardless of DST).
Definition: ucal.h:433
UCAL_MINIMAL_DAYS_IN_FIRST_WEEK
Minimum number of days in first week.
Definition: ucal.h:897
ucal_getTimeZoneIDForWindowsID
int32_t ucal_getTimeZoneIDForWindowsID(const UChar *winid, int32_t len, const char *region, UChar *id, int32_t idCapacity, UErrorCode *status)
Converts a Windows time zone ID to an equivalent system time zone ID for a region.
ucal_countAvailable
int32_t ucal_countAvailable(void)
Determine how many locales have calendars available.
UCAL_LENIENT
Lenient parsing.
Definition: ucal.h:887
UCAL_AM
AM.
Definition: ucal.h:533
UCAL_ERA
Field number indicating the era, e.g., AD or BC in the Gregorian (Julian) calendar.
Definition: ucal.h:204
UCAL_WEEKEND_CEASE
Designates a day that starts as the weekend and transitions to a weekday.
Definition: ucal.h:1376
UCAL_TZ_TRANSITION_NEXT_INCLUSIVE
Get the next transition on or after the current date, i.e.
Definition: ucal.h:1479
ucal_inDaylightTime
UBool ucal_inDaylightTime(const UCalendar *cal, UErrorCode *status)
Determine if a UCalendar is currently in daylight savings time.
UCAL_WEEKDAY
Designates a full weekday (no part of the day is included in the weekend).
Definition: ucal.h:1359
UCAL_UNDECIMBER
Value of the UCAL_MONTH field indicating the thirteenth month of the year.
Definition: ucal.h:522
ucal_get
int32_t ucal_get(const UCalendar *cal, UCalendarDateFields field, UErrorCode *status)
Get the current value of a field from a UCalendar.
ucal_getLimit
int32_t ucal_getLimit(const UCalendar *cal, UCalendarDateFields field, UCalendarLimitType type, UErrorCode *status)
Determine a limit for a field in a UCalendar.
ucal_isSet
UBool ucal_isSet(const UCalendar *cal, UCalendarDateFields field)
Determine if a field in a UCalendar is set.
UCAL_TZ_TRANSITION_NEXT
Get the next transition after the current date, i.e.
Definition: ucal.h:1473
UCAL_MAXIMUM
Maximum value.
Definition: ucal.h:1244
UCAL_JUNE
June.
Definition: ucal.h:505
UCAL_LEAST_MAXIMUM
Leaest maximum value.
Definition: ucal.h:1248
UDate
double UDate
Date and Time data type.
Definition: utypes.h:203
UCAL_WEEK_OF_MONTH
Field number indicating the week number within the current month.
Definition: ucal.h:259
UEnumeration
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:43
UCAL_MILLISECOND
Field number indicating the millisecond within the second.
Definition: ucal.h:371
UCAL_EXTENDED_YEAR
Year of this calendar system, encompassing all supra-year fields.
Definition: ucal.h:410
UCAL_STANDARD
Standard display name.
Definition: ucal.h:787
ucal_isWeekend
UBool ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status)
Returns TRUE if the given UDate is in the weekend in this calendar system.
UCAL_ACTUAL_MINIMUM
Actual minimum value.
Definition: ucal.h:1250
UCAL_FRIDAY
Friday.
Definition: ucal.h:482
ucal_getTimeZoneTransitionDate
UBool ucal_getTimeZoneTransitionDate(const UCalendar *cal, UTimeZoneTransitionType type, UDate *transition, UErrorCode *status)
Get the UDate for the next/previous time zone transition relative to the calendar&#39;s current date...
ucal_getAvailable
const char * ucal_getAvailable(int32_t localeIndex)
Get a locale for which calendars are available.
UCAL_MINIMUM
Minimum value.
Definition: ucal.h:1242
ucal_getDayOfWeekType
UCalendarWeekdayType ucal_getDayOfWeekType(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status)
Returns whether the given day of the week is a weekday, a weekend day, or a day that transitions from...
ucal_equivalentTo
UBool ucal_equivalentTo(const UCalendar *cal1, const UCalendar *cal2)
Returns TRUE if two UCalendars are equivalent.
UCAL_WEDNESDAY
Wednesday.
Definition: ucal.h:478
UCAL_TUESDAY
Tuesday.
Definition: ucal.h:476
UCalendarWeekdayType
UCalendarWeekdayType
Weekday types, as returned by ucal_getDayOfWeekType().
Definition: ucal.h:1354
UCAL_SATURDAY
Saturday.
Definition: ucal.h:484
UCAL_MARCH
March.
Definition: ucal.h:499
UCAL_YEAR_WOY
Field number indicating the extended year corresponding to the UCAL_WEEK_OF_YEAR field.
Definition: ucal.h:394
UCAL_DAY_OF_MONTH
Field number indicating the day of the month.
Definition: ucal.h:457
LocalUCalendarPointer
"Smart pointer" class, closes a UCalendar via ucal_close().
UCalendarAttribute
UCalendarAttribute
Types of UCalendar attributes.
Definition: ucal.h:882
UTimeZoneTransitionType
UTimeZoneTransitionType
Time zone transition types for ucal_getTimeZoneTransitionDate.
Definition: ucal.h:1467
UCAL_TZ_TRANSITION_PREVIOUS
Get the previous transition before the current date, i.e.
Definition: ucal.h:1485
UCAL_WALLTIME_FIRST
An ambiguous wall time to be interpreted as the earliest.
Definition: ucal.h:934
UCAL_SUNDAY
Sunday.
Definition: ucal.h:472
UCalendarWallTimeOption
UCalendarWallTimeOption
Options for handling ambiguous wall time at time zone offset transitions.
Definition: ucal.h:920
UCAL_AM_PM
Field number indicating whether the HOUR is before or after noon.
Definition: ucal.h:327
UCAL_DAY_OF_WEEK_IN_MONTH
Field number indicating the ordinal number of the day of the week within the current month...
Definition: ucal.h:316
UCAL_FIRST_DAY_OF_WEEK
First day of week.
Definition: ucal.h:892
ucal_getTimeZoneID
int32_t ucal_getTimeZoneID(const UCalendar *cal, UChar *result, int32_t resultLength, UErrorCode *status)
Get the ID of the UCalendar&#39;s time zone.
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137
UCAL_FEBRUARY
February.
Definition: ucal.h:497
ucal_getFieldDifference
int32_t ucal_getFieldDifference(UCalendar *cal, UDate target, UCalendarDateFields field, UErrorCode *status)
Return the difference between the target time and the time this calendar object is currently set to...
UCAL_OCTOBER
October.
Definition: ucal.h:513
UCAL_SHORT_DST
Short daylight savings display name.
Definition: ucal.h:793
ucal_getDSTSavings
int32_t ucal_getDSTSavings(const UChar *zoneID, UErrorCode *ec)
Return the amount of time in milliseconds that the clock is advanced during daylight savings time for...
UCAL_GREATEST_MINIMUM
Greatest minimum value.
Definition: ucal.h:1246
UCalendarDaysOfWeek
UCalendarDaysOfWeek
Useful constant for days of week.
Definition: ucal.h:470
UCAL_NOVEMBER
November.
Definition: ucal.h:515
ucal_getLocaleByType
const char * ucal_getLocaleByType(const UCalendar *cal, ULocDataLocaleType type, UErrorCode *status)
Get the locale for this calendar object.
U_DEFINE_LOCAL_OPEN_POINTER
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
Definition: localpointer.h:487
UCAL_DST
Daylight savings display name.
Definition: ucal.h:791
UCAL_TRADITIONAL
Despite the name, UCAL_TRADITIONAL designates the locale&#39;s default calendar, which may be the Gregori...
Definition: ucal.h:179
ucal_getKeywordValuesForLocale
UEnumeration * ucal_getKeywordValuesForLocale(const char *key, const char *locale, UBool commonlyUsed, UErrorCode *status)
Given a key and a locale, returns an array of string values in a preferred order that would make a di...
localpointer.h
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
UCAL_JULY
July.
Definition: ucal.h:507
ucal_openTimeZones
UEnumeration * ucal_openTimeZones(UErrorCode *ec)
Create an enumeration over all time zones.
UCAL_ZONE_TYPE_CANONICAL_LOCATION
Canonical system zones associated with actual locations.
Definition: ucal.h:562
UCAL_MONDAY
Monday.
Definition: ucal.h:474
UCAL_HOUR
Field number indicating the hour of the morning or afternoon.
Definition: ucal.h:338
UCAL_MINUTE
Field number indicating the minute within the hour.
Definition: ucal.h:355
ucal_openCountryTimeZones
UEnumeration * ucal_openCountryTimeZones(const char *country, UErrorCode *ec)
Create an enumeration over all time zones associated with the given country.
ucal_open
UCalendar * ucal_open(const UChar *zoneID, int32_t len, const char *locale, UCalendarType type, UErrorCode *status)
Open a UCalendar.
ucal_getAttribute
int32_t ucal_getAttribute(const UCalendar *cal, UCalendarAttribute attr)
Get a numeric attribute associated with a UCalendar.
UCAL_APRIL
April.
Definition: ucal.h:501
ucal_setAttribute
void ucal_setAttribute(UCalendar *cal, UCalendarAttribute attr, int32_t newValue)
Set a numeric attribute associated with a UCalendar.
UCAL_ZONE_TYPE_ANY
Any system zones.
Definition: ucal.h:552
UCAL_DAY_OF_WEEK
Field number indicating the day of the week.
Definition: ucal.h:291
ucal_set
void ucal_set(UCalendar *cal, UCalendarDateFields field, int32_t value)
Set the value of a field in a UCalendar.
UCAL_IS_LEAP_MONTH
Whether or not the current month is a leap month (0 or 1).
Definition: ucal.h:439
UCAL_SKIPPED_WALL_TIME
The behavior for handling skipped wall time at positive time zone offset transitions.
Definition: ucal.h:909
UCAL_YEAR
Field number indicating the year.
Definition: ucal.h:210
UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE
Get the previous transition on or before the current date, i.e.
Definition: ucal.h:1491
ucal_close
void ucal_close(UCalendar *cal)
Close a UCalendar.
ucal_getTZDataVersion
const char * ucal_getTZDataVersion(UErrorCode *status)
Returns the timezone data version currently used by ICU.
ucal_setMillis
void ucal_setMillis(UCalendar *cal, UDate dateTime, UErrorCode *status)
Set a UCalendar&#39;s current time in millis.
ucal_getWeekendTransition
int32_t ucal_getWeekendTransition(const UCalendar *cal, UCalendarDaysOfWeek dayOfWeek, UErrorCode *status)
Returns the time during the day at which the weekend begins or ends in this calendar system...
UCAL_ACTUAL_MAXIMUM
Actual maximum value.
Definition: ucal.h:1252
UChar
uint16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:342
UCalendarType
UCalendarType
Possible types of UCalendars.
Definition: ucal.h:173
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
ucal_setDate
void ucal_setDate(UCalendar *cal, int32_t year, int32_t month, int32_t date, UErrorCode *status)
Set a UCalendar&#39;s current date.
UCAL_THURSDAY
Thursday.
Definition: ucal.h:480
UCAL_SEPTEMBER
September.
Definition: ucal.h:511
ucal_setDateTime
void ucal_setDateTime(UCalendar *cal, int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, int32_t second, UErrorCode *status)
Set a UCalendar&#39;s current date.
UCAL_WALLTIME_NEXT_VALID
An ambiguous wall time to be interpreted as the next valid wall time.
Definition: ucal.h:940
UCAL_ZONE_TYPE_CANONICAL
Canonical system zones.
Definition: ucal.h:557
USystemTimeZoneType
USystemTimeZoneType
System time zone type constants used by filtering zones in ucal_openTimeZoneIDEnumeration.
Definition: ucal.h:547
UCAL_DOW_LOCAL
Field number indicating the localized day of week.
Definition: ucal.h:402
UCAL_WEEKEND
Designates a full weekend day (the entire day is included in the weekend).
Definition: ucal.h:1364
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:401
ucal_add
void ucal_add(UCalendar *cal, UCalendarDateFields field, int32_t amount, UErrorCode *status)
Add a specified signed amount to a particular field in a UCalendar.
ucal_setDefaultTimeZone
void ucal_setDefaultTimeZone(const UChar *zoneID, UErrorCode *ec)
Set the default time zone.
ULocDataLocaleType
ULocDataLocaleType
Constants for *_getLocale() Allow user to select whether she wants information on requested...
Definition: uloc.h:338
UCAL_GREGORIAN
Unambiguously designates the Gregorian calendar for the locale.
Definition: ucal.h:189
uenum.h
C API: String Enumeration.
ucal_getDefaultTimeZone
int32_t ucal_getDefaultTimeZone(UChar *result, int32_t resultCapacity, UErrorCode *ec)
Return the default time zone.
UCAL_JANUARY
January.
Definition: ucal.h:495
ucal_getWindowsTimeZoneID
int32_t ucal_getWindowsTimeZoneID(const UChar *id, int32_t len, UChar *winid, int32_t winidCapacity, UErrorCode *status)
Converts a system time zone ID to an equivalent Windows time zone ID.
ucal_getType
const char * ucal_getType(const UCalendar *cal, UErrorCode *status)
Get the resource keyword value string designating the calendar type for the UCalendar.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UCAL_REPEATED_WALL_TIME
The behavior for handling wall time repeating multiple times at negative time zone offset transitions...
Definition: ucal.h:903
ucal_getTimeZoneDisplayName
int32_t ucal_getTimeZoneDisplayName(const UCalendar *cal, UCalendarDisplayNameType type, const char *locale, UChar *result, int32_t resultLength, UErrorCode *status)
Get the display name for a UCalendar&#39;s TimeZone.
UCAL_WEEKEND_ONSET
Designates a day that starts as a weekday and transitions to the weekend.
Definition: ucal.h:1370
UCAL_DST_OFFSET
Field number indicating the daylight savings offset in milliseconds.
Definition: ucal.h:385
UCAL_SECOND
Field number indicating the second within the minute.
Definition: ucal.h:363
UCAL_FIELD_COUNT
One more than the highest normal UCalendarDateFields value.
Definition: ucal.h:447
ucal_roll
void ucal_roll(UCalendar *cal, UCalendarDateFields field, int32_t amount, UErrorCode *status)
Add a specified signed amount to a particular field in a UCalendar.
UCalendarDisplayNameType
UCalendarDisplayNameType
Possible formats for a UCalendar&#39;s display name.
Definition: ucal.h:785
UCAL_ZONE_OFFSET
Field number indicating the raw offset from GMT in milliseconds.
Definition: ucal.h:378
ucal_setTimeZone
void ucal_setTimeZone(UCalendar *cal, const UChar *zoneID, int32_t len, UErrorCode *status)
Set the TimeZone used by a UCalendar.
ucal_getCanonicalTimeZoneID
int32_t ucal_getCanonicalTimeZoneID(const UChar *id, int32_t len, UChar *result, int32_t resultCapacity, UBool *isSystemID, UErrorCode *status)
Returns the canonical system timezone ID or the normalized custom time zone ID for the given time zon...
UCalendarAMPMs
UCalendarAMPMs
Possible AM/PM values in a UCalendar.
Definition: ucal.h:531
UCAL_WEEK_OF_YEAR
Field number indicating the week number within the current year.
Definition: ucal.h:244
UCalendarLimitType
UCalendarLimitType
Possible limit values for a UCalendar.
Definition: ucal.h:1240
ucal_getNow
UDate ucal_getNow(void)
Get the current date and time.
UCalendarMonths
UCalendarMonths
Possible months in a UCalendar.
Definition: ucal.h:493
UCAL_DECEMBER
December.
Definition: ucal.h:517
ucal_openTimeZoneIDEnumeration
UEnumeration * ucal_openTimeZoneIDEnumeration(USystemTimeZoneType zoneType, const char *region, const int32_t *rawOffset, UErrorCode *ec)
Create an enumeration over system time zone IDs with the given filter conditions. ...
UCAL_WALLTIME_LAST
An ambiguous wall time to be interpreted as the latest.
Definition: ucal.h:927
UCAL_HOUR_OF_DAY
Field number indicating the hour of the day.
Definition: ucal.h:347
UCAL_JULIAN_DAY
Field number indicating the modified Julian day number.
Definition: ucal.h:422
ucal_getMillis
UDate ucal_getMillis(const UCalendar *cal, UErrorCode *status)
Get a UCalendar&#39;s current time in millis.
ucal_getGregorianChange
UDate ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode)
Gets the Gregorian Calendar change date.
ucal_clearField
void ucal_clearField(UCalendar *cal, UCalendarDateFields field)
Clear a field in a UCalendar.
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:111
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:225
UCAL_MONTH
Field number indicating the month.
Definition: ucal.h:231
UCAL_PM
PM.
Definition: ucal.h:535
uloc.h
C API: Locale