HebrewCalendar.MaxSupportedDateTime Property

Gets the latest date and time supported by the HebrewCalendar type.

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)

public override DateTime MaxSupportedDateTime { get; }
/** @property */
public DateTime get_MaxSupportedDateTime ()

public override function get MaxSupportedDateTime () : DateTime

Not applicable.

Property Value

The latest date and time supported by the HebrewCalendar type, which is equivalent to the last moment of September, 29, 2239 C.E. in the Gregorian calendar.

The following code 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.
      HebrewCalendar myCal = new HebrewCalendar();
      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.HebrewCalendar
MinSupportedDateTime: 04/07/5343 (in Gregorian, 01/01/1583)
MaxSupportedDateTime: 13/29/5999 (in Gregorian, 09/29/2239)

*/

import System.* ;
import System.Globalization.* ;

public class SamplesCalendar
{
    public static void main(String[] args)
    {
        // Create an instance of the calendar.
        HebrewCalendar myCal = new HebrewCalendar();

        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.get_MinSupportedDateTime();

        Console.Write("MinSupportedDateTime: {0}/{1}/{2}", 
            ((System.Int32)myCal.GetMonth(myMin)).ToString("D2"), 
            ((System.Int32)myCal.GetDayOfMonth(myMin)).ToString("D2"), 
            ((System.Int32)myCal.GetYear(myMin)).ToString("D4"));
        
        Console.WriteLine(" (in Gregorian, {0:D2}/{1:D2}/{2:D4})", 
            ((System.Int32)myGre.GetMonth(myMin)).ToString("D2"), 
            ((System.Int32)myGre.GetDayOfMonth(myMin)).ToString("D2"), 
            ((System.Int32)myGre.GetYear(myMin)).ToString("D4"));

        // Display the MaxSupportedDateTime and its equivalent in the GregorianCalendar.
        DateTime myMax = myCal.get_MaxSupportedDateTime();

        Console.Write("MaxSupportedDateTime: {0}/{1}/{2}", 
            ((System.Int32)myCal.GetMonth(myMax)).ToString("D2"), 
            ((System.Int32)myCal.GetDayOfMonth(myMax)).ToString("D2"), 
            ((System.Int32)myCal.GetYear(myMax)).ToString("D4"));
        
        Console.WriteLine(" (in Gregorian, {0}/{1}/{2})", 
            ((System.Int32)myGre.GetMonth(myMax)).ToString("D2"), 
            ((System.Int32)myGre.GetDayOfMonth(myMax)).ToString("D2"), 
            ((System.Int32)myGre.GetYear(myMax)).ToString("D4"));
    } //main 
} //SamplesCalendar

/*
This code produces the following output.

System.Globalization.HebrewCalendar
MinSupportedDateTime: 04/07/5343 (in Gregorian, 01/01/1583)
MaxSupportedDateTime: 13/29/5999 (in Gregorian, 09/29/2239)

*/

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: