TaiwanCalendar.MaxSupportedDateTime プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)

[ComVisibleAttribute(false)] public: virtual property DateTime MaxSupportedDateTime { DateTime get () override; }
TaiwanCalendar 型でサポートされている最も新しい日付と時刻。これは、グレゴリオ暦での紀元 9999 年 12 月 31 日の最後の瞬間に相当します。

カレンダーの最小値および最大値を取得するコードの例を次に示します。
Imports System Imports System.Globalization Public Class SamplesCalendar Public Shared Sub Main() ' Create an instance of the calendar. Dim myCal As New TaiwanCalendar() 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 DateTime = 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 DateTime = 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)) End Sub 'Main End Class 'SamplesCalendar 'This code produces the following output. ' 'System.Globalization.TaiwanCalendar 'MinSupportedDateTime: 01/01/0001 (in Gregorian, 01/01/1912) 'MaxSupportedDateTime: 12/31/8088 (in Gregorian, 12/31/9999)
using System; using System.Globalization; public class SamplesCalendar { public static void Main() { // Create an instance of the calendar. TaiwanCalendar myCal = new TaiwanCalendar(); Console.WriteLine( myCal.ToString() ); // Create an instance of the GregorianCalendar. GregorianCalendar myGre = new GregorianCalendar(); // Display the MinValue 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 MaxValue 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.TaiwanCalendar MinSupportedDateTime: 01/01/0001 (in Gregorian, 01/01/1912) MaxSupportedDateTime: 12/31/8088 (in Gregorian, 12/31/9999) */
using namespace System; using namespace System::Globalization; int main() { // Create an instance of the calendar. TaiwanCalendar^ myCal = gcnew TaiwanCalendar; 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.TaiwanCalendar MinSupportedDateTime: 01/01/0001 (in Gregorian, 01/01/1912) MaxSupportedDateTime: 12/31/8088 (in Gregorian, 12/31/9999) */
import System.*; import System.Globalization.*; public class SamplesCalendar { public static void main(String[] args) { // Create an instance of the calendar. TaiwanCalendar myCal = new TaiwanCalendar(); 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}/{1}/{2})", ((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.TaiwanCalendar MinSupportedDateTime: 01/01/0001 (in Gregorian, 01/01/1912) MaxSupportedDateTime: 12/31/8088 (in Gregorian, 12/31/9999) */

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- TaiwanCalendar.MaxSupportedDateTime プロパティのページへのリンク