JapaneseCalendar::MinSupportedDateTime Property
Gets the earliest date and time supported by the current JapaneseCalendar object.
Assembly: mscorlib (in mscorlib.dll)
[ComVisibleAttribute(false)] public: virtual property DateTime MinSupportedDateTime { DateTime get () override; }
Property Value
Type: System::DateTimeThe earliest date and time supported by the JapaneseCalendar type, which is equivalent to the first moment of September 8, 1868 C.E. in the Gregorian calendar.
The earliest date supported by the JapaneseCalendar class is September 8, 1868, in the first year of the Meiji era. Ordinarily, date and time operations that use the JapaneseCalendar class throw an ArgumentOutOfRangeException for dates before this date. However, some members, such as the GetEra method, support dates from January 1 to September 7 in the year Meiji 1.
The following example gets the earliest and latest dates supported by the calendar.
using namespace System; using namespace System::Globalization; int main() { // Create an instance of the calendar. JapaneseCalendar^ myCal = gcnew JapaneseCalendar; Console::WriteLine( myCal ); // Create an instance of the GregorianCalendar. GregorianCalendar^ myGre = gcnew 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.JapaneseCalendar MinSupportedDateTime: 09/08/0001 (in Gregorian, 09/08/1868) MaxSupportedDateTime: 12/31/8011 (in Gregorian, 12/31/9999) */
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.