private CheckYearRange ( int year, int era ) : void | ||
year | int | |
era | int | |
Результат | void |
/// <summary>Returns the number of days in the specified year and era.</summary> /// <param name="year">An integer that represents the year. </param> /// <param name="era">An integer that represents the era. </param> /// <returns>The number of days in the specified year and era. The number of days is 354 in a common year or 355 in a leap year.</returns> /// <exception cref="T:System.ArgumentOutOfRangeException"> /// <paramref name="year" /> or <paramref name="era" /> is outside the range supported by this calendar. </exception> // Token: 0x06002EB9 RID: 11961 RVA: 0x000B37FA File Offset: 0x000B19FA public override int GetDaysInYear(int year, int era) { HijriCalendar.CheckYearRange(year, era); if (!this.IsLeapYear(year, 0)) { return(354); } return(355); }
internal static void CheckYearMonthRange(int year, int month, int era) { HijriCalendar.CheckYearRange(year, era); if (year == 9666 && month > 4) { throw new ArgumentOutOfRangeException("month", string.Format((IFormatProvider)CultureInfo.CurrentCulture, Environment.GetResourceString("ArgumentOutOfRange_Range"), (object)1, (object)4)); } if (month < 1 || month > 12) { throw new ArgumentOutOfRangeException("month", Environment.GetResourceString("ArgumentOutOfRange_Month")); } }
/// <summary>确定指定纪元中的指定年份是否为闰年。</summary> /// <returns>如果指定的年是闰年,则为 true;否则为 false。</returns> /// <param name="year">表示年份的整数。</param> /// <param name="era">表示纪元的整数。</param> /// <exception cref="T:System.ArgumentOutOfRangeException"> /// <paramref name="era" /> 超出了此日历支持的范围。- 或 -<paramref name="year" /> 超出了此日历支持的范围。</exception> public override bool IsLeapYear(int year, int era) { HijriCalendar.CheckYearRange(year, era); return((year * 11 + 14) % 30 < 11); }
public override int GetLeapMonth(int year, int era) { HijriCalendar.CheckYearRange(year, era); return(0); }
/// <summary>返回指定纪元年份中的月数。</summary> /// <returns>指定纪元年份中的月数。</returns> /// <param name="year">表示年份的整数。</param> /// <param name="era">表示纪元的整数。</param> /// <exception cref="T:System.ArgumentOutOfRangeException"> /// <paramref name="era" /> 超出了此日历支持的范围。- 或 -<paramref name="year" /> 超出了此日历支持的范围。</exception> public override int GetMonthsInYear(int year, int era) { HijriCalendar.CheckYearRange(year, era); return(12); }