Example #1
0
    public static void Main()
    {
        // Creates and initializes a JulianCalendar.
        JulianCalendar myCal = new JulianCalendar();

        // Checks all the months in five years in the current era.
        int iMonthsInYear;

        for (int y = 2001; y <= 2005; y++)
        {
            Console.Write("{0}:\t", y);
            iMonthsInYear = myCal.GetMonthsInYear(y, JulianCalendar.CurrentEra);
            for (int m = 1; m <= iMonthsInYear; m++)
            {
                Console.Write("\t{0}", myCal.IsLeapMonth(y, m, JulianCalendar.CurrentEra));
            }
            Console.WriteLine();
        }
    }