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

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

Microsoft Visual Basic では、DateTime 型でサポートされる最も古い日付 (西暦 1 年 1 月 1 日) の指定された時刻として日時を表します。ただし、TaiwanCalendar 型ではこの最も古い日付をサポートしていません。したがって、現在の暦を使用して日時を書式指定するメソッドを呼び出すときに、書式指定子を指定していない場合、書式指定では、既定の一般 ("G") 日付/時刻パターン書式指定子ではなく、ISO 8601 準拠の並べ替え可能な ("s") 日付/時刻パターン書式指定子が使用されます。詳細については、「標準の DateTime 書式指定文字列」を参照してください。

カレンダーの最小値および最大値を取得するコードの例を次に示します。
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.MinSupportedDateTime プロパティのページへのリンク