GregorianCalendar.IsLeapMonth : GregorianCalendar « Date Time « C# / C Sharp






GregorianCalendar.IsLeapMonth

 

using System;
using System.Globalization;


public class SamplesGregorianCalendar  {
   public static void Main()  {
      GregorianCalendar myCal = new GregorianCalendar();
      int iMonthsInYear;
      for ( int y = 2001; y <= 2010; y++ )  {
         Console.Write( "{0}:\t", y );
         iMonthsInYear = myCal.GetMonthsInYear( y, GregorianCalendar.CurrentEra );
         for ( int m = 1; m <= iMonthsInYear; m++ )
            Console.Write( "\t{0}", myCal.IsLeapMonth( y, m, GregorianCalendar.CurrentEra ) );
      }
   }
}

   
  








Related examples in the same category

1.GregorianCalendar Class
2.GregorianCalendar Constructor
3.GregorianCalendar.AddMonths
4.GregorianCalendar.GetDayOfMonth
5.GregorianCalendar.GetDaysInMonth
6.GregorianCalendar.GetDaysInYear
7.GregorianCalendar.GetMonthsInYear
8.GregorianCalendar.GetWeekOfYear
9.GregorianCalendar.IsLeapDay
10.GregorianCalendar.IsLeapYear
11.GregorianCalendar.MaxSupportedDateTime
12.GregorianCalendarTypes Enumeration