Logo Search packages:      
Sourcecode: icu version File versions

DateIntervalFormat *U_EXPORT2 DateIntervalFormat::create ( const Locale locale,
DateIntervalInfo dtitvinf,
const UnicodeString skeleton,
UErrorCode status 
) [static, private]

Construct a DateIntervalFormat from DateFormat and a DateIntervalInfo.

It is a wrapper of the constructor.

locale the locale of this date interval formatter.
dtitvinf the DateIntervalInfo object to be adopted.
skeleton the skeleton of this formatter.
status Output param set to success/failure code.
a date time interval formatter which the caller owns.

For internal use only.

ICU 4.0

Definition at line 488 of file dtitvfmt.cpp.

References DateIntervalFormat(), NULL, U_FAILURE, and U_MEMORY_ALLOCATION_ERROR.

Referenced by createInstance().

    DateIntervalFormat* f = new DateIntervalFormat(locale, dtitvinf, 
                                                   skeleton, status);
    if ( f == NULL ) {
        delete dtitvinf;
    } else if ( U_FAILURE(status) ) {
        // safe to delete f, although nothing acutally is saved
        delete f;
        f = 0;
    return f;

Generated by  Doxygen 1.6.0   Back to index