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

int32_t IslamicCalendar::handleGetMonthLength ( int32_t  extendedYear,
int32_t  month 
) const [protected, virtual]

Return the length (in days) of the given month.

Parameters:
year The hijri year
year The hijri month, 0-based

For internal use only.

Return the length (in days) of the given month.

Parameters:
year The hijri year
year The hijri month, 0-based ICU 2.4

Reimplemented from Calendar.

Definition at line 319 of file islamcal.cpp.

References civil, civilLeapYear(), DHU_AL_HIJJAH, and trueMonthStart().

                                                                                       {

    int32_t length = 0;

    if (civil == CIVIL) {
        length = 29 + (month+1) % 2;
        if (month == DHU_AL_HIJJAH && civilLeapYear(extendedYear)) {
            length++;
        }
    } else {
        month = 12*(extendedYear-1) + month;
        length =  trueMonthStart(month+1) - trueMonthStart(month) ;
    }
    return length;
}


Generated by  Doxygen 1.6.0   Back to index