    }
    int nLastDay = DaysInMonth( rMonth, rYear );
    int nRealDay = (rbLastDayMode && rbLastDay) ? nLastDay :min( nLastDay, rDay );
    return DateToDays( nRealDay, rMonth, rYear ) - nNullDate;
}
