ThaiBuddhistCalendar.MinSupportedDateTime Property
.NET Framework 4.5
Gets the earliest date and time supported by the ThaiBuddhistCalendar class.
Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System.DateTimeThe earliest date and time supported by the ThaiBuddhistCalendar class, which is equivalent to the first moment of January 1, 0001 C.E. in the Gregorian calendar.
The following example gets the minimum value and the maximum value of the calendar.
using System; using System.Globalization; public class SamplesCalendar { public static void Main() { // Create an instance of the calendar. ThaiBuddhistCalendar myCal = new ThaiBuddhistCalendar(); Console.WriteLine( myCal.ToString() ); // Create an instance of the GregorianCalendar. GregorianCalendar myGre = new GregorianCalendar(); // Display the MinSupportedDateTime and its equivalent in the GregorianCalendar. DateTime myMin = myCal.MinSupportedDateTime; Console.Write( "MinSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal.GetMonth(myMin), myCal.GetDayOfMonth(myMin), myCal.GetYear(myMin) ); Console.WriteLine( " (in Gregorian, {0:D2}/{1:D2}/{2:D4})", myGre.GetMonth(myMin), myGre.GetDayOfMonth(myMin), myGre.GetYear(myMin) ); // Display the MaxSupportedDateTime and its equivalent in the GregorianCalendar. DateTime myMax = myCal.MaxSupportedDateTime; Console.Write( "MaxSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal.GetMonth(myMax), myCal.GetDayOfMonth(myMax), myCal.GetYear(myMax) ); Console.WriteLine( " (in Gregorian, {0:D2}/{1:D2}/{2:D4})", myGre.GetMonth(myMax), myGre.GetDayOfMonth(myMax), myGre.GetYear(myMax) ); } } /* This code produces the following output. System.Globalization.ThaiBuddhistCalendar MinSupportedDateTime: 01/01/0544 (in Gregorian, 01/01/0001) MaxSupportedDateTime: 12/31/10542 (in Gregorian, 12/31/9999) */
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.