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

void TaiwanCalendar::handleComputeFields ( int32_t  julianDay,
UErrorCode status 
) [protected, virtual]

Subclasses may override this method to compute several fields specific to each calendar system.

For internal use only.

Reimplemented from GregorianCalendar.

Definition at line 84 of file taiwncal.cpp.

References GregorianCalendar::handleComputeFields(), Calendar::internalGet(), Calendar::internalSet(), UCAL_ERA, UCAL_EXTENDED_YEAR, and UCAL_YEAR.

{
    GregorianCalendar::handleComputeFields(julianDay, status);
    int32_t y = internalGet(UCAL_EXTENDED_YEAR) - kTaiwanEraStart;
    if(y>0) {
        internalSet(UCAL_ERA, MINGUO);
        internalSet(UCAL_YEAR, y);
    } else {
        internalSet(UCAL_ERA, BEFORE_MINGUO);
        internalSet(UCAL_YEAR, 1-y);
    }
}


Generated by  Doxygen 1.6.0   Back to index