Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ucal.h

Go to the documentation of this file.
00001 /*
00002 * Copyright (C) 1996-1999, International Business Machines Corporation and others. All Rights Reserved.
00003 *******************************************************************************
00004 */
00005 
00006 #ifndef UCAL_H
00007 #define UCAL_H
00008 
00009 #include "unicode/utypes.h"
00138 typedef void* UCalendar;
00139 
00141 enum UCalendarType {
00143   UCAL_TRADITIONAL,
00145   UCAL_GREGORIAN
00146 };
00147 typedef enum UCalendarType UCalendarType;
00148 
00150 enum UCalendarDateFields {
00152   UCAL_ERA,
00154   UCAL_YEAR,
00156   UCAL_MONTH,
00158   UCAL_WEEK_OF_YEAR,
00160   UCAL_WEEK_OF_MONTH,
00162   UCAL_DATE,
00164   UCAL_DAY_OF_YEAR,
00166   UCAL_DAY_OF_WEEK,
00168   UCAL_DAY_OF_WEEK_IN_MONTH,
00170   UCAL_AM_PM,
00172   UCAL_HOUR,
00174   UCAL_HOUR_OF_DAY,
00176   UCAL_MINUTE,
00178   UCAL_SECOND,
00180   UCAL_MILLISECOND,
00182   UCAL_ZONE_OFFSET,
00184   UCAL_DST_OFFSET,
00186   UCAL_YEAR_WOY,
00188   UCAL_DOW_LOCAL,
00190   UCAL_FIELD_COUNT
00191 };
00192 typedef enum UCalendarDateFields UCalendarDateFields;
00199 enum UCalendarDaysOfWeek {
00201   UCAL_SUNDAY = 1,
00203   UCAL_MONDAY,
00205   UCAL_TUESDAY,
00207   UCAL_WEDNESDAY,
00209   UCAL_THURSDAY,
00211   UCAL_FRIDAY,
00213   UCAL_SATURDAY
00214 };
00215 typedef enum UCalendarDaysOfWeek UCalendarDaysOfWeek;
00216 
00218 enum UCalendarMonths {
00220   UCAL_JANUARY,
00222   UCAL_FEBRUARY,
00224   UCAL_MARCH,
00226   UCAL_APRIL,
00228   UCAL_MAY,
00230   UCAL_JUNE,
00232   UCAL_JULY,
00234   UCAL_AUGUST,
00236   UCAL_SEPTEMBER,
00238   UCAL_OCTOBER,
00240   UCAL_NOVEMBER,
00242   UCAL_DECEMBER,
00244   UCAL_UNDECIMBER
00245 };
00246 typedef enum UCalendarMonths UCalendarMonths;
00247 
00249 enum UCalendarAMPMs {
00251   UCAL_AM,
00253   UCAL_PM
00254 };
00255 typedef enum UCalendarAMPMs UCalendarAMPMs;
00256 
00267 U_CAPI const UChar*
00268 ucal_getAvailableTZIDs(        int32_t         rawOffset,
00269                 int32_t         index,
00270                 UErrorCode*     status);
00271 
00281 U_CAPI int32_t
00282 ucal_countAvailableTZIDs(int32_t rawOffset);
00283 
00290 U_CAPI UDate
00291 ucal_getNow(void);
00292 
00305 U_CAPI UCalendar*
00306 ucal_open(    const    UChar*          zoneID,
00307             int32_t        len,
00308         const    char*           locale,
00309             UCalendarType     type,
00310             UErrorCode*    status);
00311 
00318 U_CAPI void
00319 ucal_close(UCalendar *cal);
00320 
00330 U_CAPI void
00331 ucal_setTimeZone(        UCalendar*      cal,
00332             const    UChar*        zoneID,
00333                 int32_t        len,
00334                 UErrorCode     *status);
00335 
00337 enum UCalendarDisplayNameType {
00339   UCAL_STANDARD,
00341   UCAL_SHORT_STANDARD,
00343   UCAL_DST,
00345   UCAL_SHORT_DST
00346 };
00347 typedef enum UCalendarDisplayNameType UCalendarDisplayNameType;
00348 
00364 U_CAPI int32_t
00365 ucal_getTimeZoneDisplayName(    const     UCalendar*                 cal,
00366                     UCalendarDisplayNameType     type,
00367                 const      char                     *locale,
00368                     UChar*                  result,
00369                     int32_t                 resultLength,
00370                     UErrorCode*             status);
00371 
00380 U_CAPI UBool
00381 ucal_inDaylightTime(    const    UCalendar*      cal,
00382                 UErrorCode*     status );
00383 
00385 enum UCalendarAttribute {
00387   UCAL_LENIENT,
00389   UCAL_FIRST_DAY_OF_WEEK,
00391   UCAL_MINIMAL_DAYS_IN_FIRST_WEEK
00392 };
00393 typedef enum UCalendarAttribute UCalendarAttribute;
00394 
00406 U_CAPI int32_t
00407 ucal_getAttribute(    const    UCalendar*              cal,
00408                 UCalendarAttribute      attr);
00409 
00421 U_CAPI void
00422 ucal_setAttribute(      UCalendar*              cal,
00423             UCalendarAttribute      attr,
00424             int32_t                 newValue);
00425 
00435 U_CAPI const char*
00436 ucal_getAvailable(int32_t index);
00437 
00446 U_CAPI int32_t
00447 ucal_countAvailable(void);
00448 
00460 U_CAPI UDate
00461 ucal_getMillis(    const    UCalendar*      cal,
00462             UErrorCode*     status);
00463 
00475 U_CAPI void
00476 ucal_setMillis(        UCalendar*      cal,
00477             UDate           dateTime,
00478             UErrorCode*     status );
00479 
00494 U_CAPI void
00495 ucal_setDate(        UCalendar*        cal,
00496             int32_t            year,
00497             int32_t            month,
00498             int32_t            date,
00499             UErrorCode        *status);
00500 
00518 U_CAPI void
00519 ucal_setDateTime(    UCalendar*        cal,
00520             int32_t            year,
00521             int32_t            month,
00522             int32_t            date,
00523             int32_t            hour,
00524             int32_t            minute,
00525             int32_t            second,
00526             UErrorCode        *status);
00527 
00537 U_CAPI UBool
00538 ucal_equivalentTo(    const UCalendar*      cal1,
00539             const UCalendar*      cal2);
00540 
00556 U_CAPI void
00557 ucal_add(    UCalendar*            cal,
00558         UCalendarDateFields        field,
00559         int32_t                amount,
00560         UErrorCode*            status);
00561 
00577 U_CAPI void
00578 ucal_roll(        UCalendar*        cal,
00579             UCalendarDateFields     field,
00580             int32_t            amount,
00581             UErrorCode*        status);
00582 
00599 U_CAPI int32_t
00600 ucal_get(    const    UCalendar*            cal,
00601             UCalendarDateFields        field,
00602             UErrorCode*            status );
00603 
00619 U_CAPI void
00620 ucal_set(    UCalendar*            cal,
00621         UCalendarDateFields        field,
00622         int32_t                value);
00623 
00639 U_CAPI UBool
00640 ucal_isSet(    const    UCalendar*        cal,
00641             UCalendarDateFields    field);
00642 
00657 U_CAPI void
00658 ucal_clearField(    UCalendar*        cal,
00659             UCalendarDateFields     field);
00660 
00671 U_CAPI void
00672 ucal_clear(UCalendar* calendar);
00673 
00675 enum UCalendarLimitType {
00677   UCAL_MINIMUM,
00679   UCAL_MAXIMUM,
00681   UCAL_GREATEST_MINIMUM,
00683   UCAL_LEAST_MAXIMUM,
00685   UCAL_ACTUAL_MINIMUM,
00687   UCAL_ACTUAL_MAXIMUM
00688 };
00689 typedef enum UCalendarLimitType UCalendarLimitType;
00690 
00705 U_CAPI int32_t
00706 ucal_getLimit(    const    UCalendar*              cal,
00707             UCalendarDateFields     field,
00708             UCalendarLimitType      type,
00709             UErrorCode        *status);
00710 
00711 #endif

Generated at Thu Mar 22 16:12:39 2001 for ICU 1.8 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000