GregorianCalendar.MinSupportedDateTime プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > GregorianCalendar.MinSupportedDateTime プロパティの意味・解説 

GregorianCalendar.MinSupportedDateTime プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

GregorianCalendar 型でサポートされている最も古い日付と時刻取得します

名前空間: System.Globalization
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ComVisibleAttribute(False)> _
Public Overrides ReadOnly
 Property MinSupportedDateTime As DateTime
Dim instance As GregorianCalendar
Dim value As DateTime

value = instance.MinSupportedDateTime
[ComVisibleAttribute(false)] 
public override DateTime MinSupportedDateTime { get;
 }
[ComVisibleAttribute(false)] 
public:
virtual property DateTime MinSupportedDateTime {
    DateTime get () override;
}
/** @property */
public DateTime get_MinSupportedDateTime ()
public override function get
 MinSupportedDateTime () : DateTime

プロパティ
GregorianCalendar 型でサポートされている最も古い日付と時刻。これは、紀元 0001 年 1 月 1 日最初瞬間であり、MinValue と等価です。

使用例使用例

カレンダー最小値および最大値取得するコードの例次に示します

Imports System
Imports System.Globalization

Public Class SamplesCalendar   

   Public Shared Sub Main()

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

      ' Display the MinSupportedDateTime.
      Dim myMin As DateTime = myCal.MinSupportedDateTime
      Console.WriteLine("MinSupportedDateTime: {0:D2}/{1:D2}/{2:D4}",
 myCal.GetMonth(myMin), myCal.GetDayOfMonth(myMin), myCal.GetYear(myMin))

      ' Display the MaxSupportedDateTime.
      Dim myMax As DateTime = myCal.MaxSupportedDateTime
      Console.WriteLine("MaxSupportedDateTime: {0:D2}/{1:D2}/{2:D4}",
 myCal.GetMonth(myMax), myCal.GetDayOfMonth(myMax), myCal.GetYear(myMax))

   End Sub 'Main 

End Class 'SamplesCalendar


'This code produces the following output.
'
'System.Globalization.GregorianCalendar
'MinSupportedDateTime: 01/01/0001
'MaxSupportedDateTime: 12/31/9999

using System;
using System.Globalization;


public class SamplesCalendar  {

   public static void Main()
  {

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

      // Display the MinSupportedDateTime.
      DateTime myMin = myCal.MinSupportedDateTime;
      Console.WriteLine( "MinSupportedDateTime: {0:D2}/{1:D2}/{2:D4}",
 myCal.GetMonth(myMin), myCal.GetDayOfMonth(myMin), myCal.GetYear(myMin) );

      // Display the MaxSupportedDateTime.
      DateTime myMax = myCal.MaxSupportedDateTime;
      Console.WriteLine( "MaxSupportedDateTime: {0:D2}/{1:D2}/{2:D4}",
 myCal.GetMonth(myMax), myCal.GetDayOfMonth(myMax), myCal.GetYear(myMax) );

   }

}


/*
This code produces the following output.

System.Globalization.GregorianCalendar
MinSupportedDateTime: 01/01/0001
MaxSupportedDateTime: 12/31/9999

*/
using namespace System;
using namespace System::Globalization;

int main()
{
   // Create an instance of the calendar.
   GregorianCalendar^ myCal = gcnew GregorianCalendar;
   Console::WriteLine( myCal );
   
   // Display the MinSupportedDateTime.
   DateTime myMin = myCal->MinSupportedDateTime;
   Console::WriteLine( "MinSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal->GetMonth(
 myMin ), myCal->GetDayOfMonth( myMin ), myCal->GetYear( myMin ) );
   
   // Display the MaxSupportedDateTime.
   DateTime myMax = myCal->MaxSupportedDateTime;
   Console::WriteLine( "MaxSupportedDateTime: {0:D2}/{1:D2}/{2:D4}", myCal->GetMonth(
 myMax ), myCal->GetDayOfMonth( myMax ), myCal->GetYear( myMax ) );
}

/*
This code produces the following output.

System.Globalization.GregorianCalendar
MinSupportedDateTime: 01/01/0001
MaxSupportedDateTime: 12/31/9999

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

public class SamplesCalendar
{
    public static void main()
    {
        // Create an instance of the calendar.
        GregorianCalendar myCal =  new GregorianCalendar();
        Console.WriteLine(myCal.toString());

        // Display the MinSupportedDateTime.
        DateTime myMin = myCal.get_MinSupportedDateTime();
        Console.WriteLine("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"));

        // Display the MaxSupportedDateTime.
        DateTime myMax = myCal.get_MaxSupportedDateTime();
        Console.WriteLine("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"));
    } //main 
} //SamplesCalendar

/*
This code produces the following output.

System.Globalization.GregorianCalendar
MinSupportedDateTime: 01/01/0001
MaxSupportedDateTime: 12/31/9999
*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「GregorianCalendar.MinSupportedDateTime プロパティ」の関連用語

GregorianCalendar.MinSupportedDateTime プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



GregorianCalendar.MinSupportedDateTime プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS