Logo Search packages:      
Sourcecode: icu version File versions  Download package

Calendar::Calendar ( TimeZone zone,
const Locale aLocale,
UErrorCode success 
) [protected]

Constructs a Calendar with the given time zone and locale. Clients are no longer responsible for deleting the given time zone object after it's adopted.

Parameters:
zone The given time zone.
aLocale The given locale.
success Indicates the status of Calendar object construction. Returns U_ZERO_ERROR if constructed successfully. ICU 2.0

Definition at line 659 of file calendar.cpp.

References clear(), fZone, NULL, setWeekCountData(), and U_ILLEGAL_ARGUMENT_ERROR.

:   UObject(),
fIsTimeSet(FALSE),
fAreFieldsSet(FALSE),
fAreAllFieldsSet(FALSE),
fAreFieldsVirtuallySet(FALSE),
fNextStamp((int32_t)kMinimumUserStamp),
fTime(0),
fLenient(TRUE),
fZone(0)
{
    if(zone == 0) {
#if defined (U_DEBUG_CAL)
        fprintf(stderr, "%s:%d: ILLEGAL ARG because timezone cannot be 0\n",
            __FILE__, __LINE__);
#endif
        success = U_ILLEGAL_ARGUMENT_ERROR;
        return;
    }

    clear();    
    fZone = zone;

    setWeekCountData(aLocale, NULL, success);
}


Generated by  Doxygen 1.6.0   Back to index