Logo Search packages:      
Sourcecode: icu version File versions

Calendar *U_EXPORT2 Calendar::createInstance ( const TimeZone zoneToAdopt,
const Locale aLocale,
UErrorCode success 
) [static, inherited]

Gets a Calendar using the given timezone and given locale. The TimeZone is _not_ adopted; the client is still responsible for deleting it.

Parameters:
zoneToAdopt The given timezone to be adopted.
aLocale The given locale.
success Indicates the success/failure of Calendar creation. Filled in with U_ZERO_ERROR if created successfully, set to a failure result otherwise.
Returns:
A Calendar if created successfully. NULL otherwise. ICU 2.0

Definition at line 882 of file calendar.cpp.

References Calendar::createInstance(), Calendar::setTimeZone(), and U_SUCCESS.

{
    Calendar* c = createInstance(aLocale, success);
    if(U_SUCCESS(success) && c) {
        c->setTimeZone(zone);
    }
    return c; 
}


Generated by  Doxygen 1.6.0   Back to index