HebrewCalendar.MinSupportedDateTime 속성

정의

HebrewCalendar 형식에서 지원하는 시작 날짜와 시간을 가져옵니다.

public:
 virtual property DateTime MinSupportedDateTime { DateTime get(); };
public override DateTime MinSupportedDateTime { get; }
member this.MinSupportedDateTime : DateTime
Public Overrides ReadOnly Property MinSupportedDateTime As DateTime

속성 값

DateTime

형식에서 지원하는 HebrewCalendar 가장 빠른 날짜 및 시간이며, 이는 1583년 1월 1일 C.E.의 첫 번째 순간과 동일합니다. 을 선택합니다.

예제

다음 코드 예제에서는 달력의 최소값 및 최대값을 가져옵니다.

using namespace System;
using namespace System::Globalization;

int main()
{
   // Create an instance of the calendar.
   HebrewCalendar^ myCal = gcnew HebrewCalendar;
   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.HebrewCalendar
MinSupportedDateTime: 04/07/5343 (in Gregorian, 01/01/1583)
MaxSupportedDateTime: 13/29/5999 (in Gregorian, 09/29/2239)

*/
using System;
using System.Globalization;

public class SamplesCalendar  {

   public static void Main()  {

      // Create an instance of the calendar.
      HebrewCalendar myCal = new HebrewCalendar();
      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.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.HebrewCalendar
MinSupportedDateTime: 04/07/5343 (in Gregorian, 01/01/1583)
MaxSupportedDateTime: 13/29/5999 (in Gregorian, 09/29/2239)

*/
Imports System.Globalization

Public Class SamplesCalendar   

   Public Shared Sub Main()

      ' Create an instance of the calendar.
      Dim myCal As New HebrewCalendar()
      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

End Class


'This code produces the following output.
'
'System.Globalization.HebrewCalendar
'MinSupportedDateTime: 04/07/5343 (in Gregorian, 01/01/1583)
'MaxSupportedDateTime: 13/29/5999 (in Gregorian, 09/29/2239)

설명

Microsoft Visual Basic 형식에서 지원하는 DateTime 최소 날짜(0001년 1월 1일 C.E)의 지정된 시간으로 하루 중 시간을 나타냅니다. 그러나 이 형식은 HebrewCalendar 최소 날짜를 지원하지 않습니다. 따라서 현재 달력을 사용하여 시간 형식을 지정하는 메서드를 호출하지만 서식 지정자를 지정하지 않는 경우 서식 지정은 기본 일반("G") 날짜/시간 패턴 형식 지정자 대신 ISO 8601 정렬 가능("s") 날짜/시간 패턴 형식 지정자를 사용합니다. 자세한 내용은 표준 날짜 및 시간 형식 문자열을 참조하세요.

적용 대상