/** * Return the day # on which the given month starts. Days are counted * from the Persian epoch, origin 0. * * @param year The Persian year * @param year The Persian month, 0-based */ int32_t PersianCalendar::monthStart(int32_t year, int32_t month) const { return handleComputeMonthStart(year,month,TRUE); }
/** * Override Calendar method to return the number of days in the given * extended year and month. * * <p>Note: This method also reads the IS_LEAP_MONTH field to determine * whether or not the given month is a leap month. * @stable ICU 2.8 */ int32_t ChineseCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { int32_t thisStart = handleComputeMonthStart(extendedYear, month, TRUE) - kEpochStartAsJulianDay + 1; // Julian day -> local days int32_t nextStart = newMoonNear(thisStart + SYNODIC_GAP, TRUE); return nextStart - thisStart; }
/** * Return the day # on which the given year starts. Days are counted * from the Persian epoch, origin 0. */ int32_t PersianCalendar::yearStart(int32_t year) { return handleComputeMonthStart(year,0,FALSE); }