System.Globalization.UmAlQuraCalendar.CheckYearMonthRange C# (CSharp) Method

CheckYearMonthRange() private method

private CheckYearMonthRange ( int year, int month, int era ) : void
year int
month int
era int
return void
        internal void CheckYearMonthRange(int year, int month, int era)  {
            CheckYearRange(year, era);
            if (month < 1 || month > 12)  {
                throw new ArgumentOutOfRangeException("month", Environment.GetResourceString("ArgumentOutOfRange_Month"));
            }
        }

Usage Example

 /// <summary>Calculates the number of days in the specified month of the specified year and era.</summary>
 /// <param name="year">A year. </param>
 /// <param name="month">An integer from 1 through 12 that represents a month. </param>
 /// <param name="era">An era. Specify <see langword="UmAlQuraCalendar.Eras[UmAlQuraCalendar.CurrentEra]" /> or <see cref="F:System.Globalization.UmAlQuraCalendar.UmAlQuraEra" />.</param>
 /// <returns>The number of days in the specified month in the specified year and era. The return value is 29 in a common year and 30 in a leap year.</returns>
 /// <exception cref="T:System.ArgumentOutOfRangeException">
 ///         <paramref name="year" />, <paramref name="month" />, or <paramref name="era" /> is outside the range supported by the <see cref="T:System.Globalization.UmAlQuraCalendar" /> class. </exception>
 // Token: 0x06002EDD RID: 11997 RVA: 0x000B3F56 File Offset: 0x000B2156
 public override int GetDaysInMonth(int year, int month, int era)
 {
     UmAlQuraCalendar.CheckYearMonthRange(year, month, era);
     if ((UmAlQuraCalendar.HijriYearInfo[year - 1318].HijriMonthsLengthFlags & 1 << month - 1) == 0)
     {
         return(29);
     }
     return(30);
 }
All Usage Examples Of System.Globalization.UmAlQuraCalendar::CheckYearMonthRange