JapaneseCalendar.MaxSupportedDateTime Eigenschap

Definitie

Hiermee haalt u de meest recente datum en tijd op die wordt ondersteund door het huidige JapaneseCalendar object.

public:
 virtual property DateTime MaxSupportedDateTime { DateTime get(); };
public override DateTime MaxSupportedDateTime { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public override DateTime MaxSupportedDateTime { get; }
member this.MaxSupportedDateTime : DateTime
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.MaxSupportedDateTime : DateTime
Public Overrides ReadOnly Property MaxSupportedDateTime As DateTime

Waarde van eigenschap

De laatste datum en tijd die wordt ondersteund door het JapaneseCalendar type, dat gelijk is aan het laatste moment van 31 december 9999 C.E. in de Gregoriaanse kalender.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld wordt de minimumwaarde en de maximumwaarde van de agenda opgehaald.

// Create an instance of the calendar.
JapaneseCalendar myCal = new();
Console.WriteLine(myCal.ToString());

// Create an instance of the GregorianCalendar.
GregorianCalendar myGre = new();

// 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 on .NET 11.

System.Globalization.JapaneseCalendar
MinSupportedDateTime: 10/23/0001 (in Gregorian, 10/23/1868)
MaxSupportedDateTime: 12/31/7981 (in Gregorian, 12/31/9999)

*/
' Create an instance of the calendar.
Dim myCal As New JapaneseCalendar()
Console.WriteLine(myCal.ToString())

' Create an instance of the GregorianCalendar.
Dim myGre As New GregorianCalendar()

' Display the MinSupportedDateTime and its equivalent in the GregorianCalendar.
Dim myMin As Date = 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.
Dim myMax As Date = 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 on .NET 11.
'
'System.Globalization.JapaneseCalendar
'MinSupportedDateTime: 10/23/0001 (in Gregorian, 10/23/1868)
'MaxSupportedDateTime: 12/31/7981 (in Gregorian, 12/31/9999)

Van toepassing op