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






GregorianCalendar.MaxSupportedDateTime

 
using System;
using System.Globalization;

public class SamplesCalendar  {
   public static void Main()  {
      GregorianCalendar myCal = new GregorianCalendar();
      Console.WriteLine( myCal.ToString() );
      DateTime myMin = myCal.MinSupportedDateTime;
      Console.WriteLine( "MinSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal.GetMonth(myMin), myCal.GetDayOfMonth(myMin), myCal.GetYear(myMin) );
      DateTime myMax = myCal.MaxSupportedDateTime;
      Console.WriteLine( "MaxSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal.GetMonth(myMax), myCal.GetDayOfMonth(myMax), myCal.GetYear(myMax) );
   }
}

   
  








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.IsLeapMonth
11.GregorianCalendar.IsLeapYear
12.GregorianCalendarTypes Enumeration