ThaiBuddhistCalendar.IsLeapMonth(Int32, Int32, Int32) 메서드

정의

지정된 연대의 지정된 연도에 있는 지정된 월이 윤월인지 여부를 확인합니다.

public:
 override bool IsLeapMonth(int year, int month, int era);
public override bool IsLeapMonth (int year, int month, int era);
override this.IsLeapMonth : int * int * int -> bool
Public Overrides Function IsLeapMonth (year As Integer, month As Integer, era As Integer) As Boolean

매개 변수

year
Int32

연도를 나타내는 정수입니다.

month
Int32

월을 나타내는 1에서 12 사이의 정수입니다.

era
Int32

연대를 나타내는 정수입니다.

반환

이 메서드는 파생 클래스에서 다시 정의되지 않는 한 항상 false를 반환합니다.

예외

year가 달력에서 지원하는 범위 밖에 있는 경우

또는

month가 달력에서 지원하는 범위 밖에 있는 경우

또는

era가 달력에서 지원하는 범위 밖에 있는 경우

예제

다음 예제에서는 현재 시대에 5년 동안 모든 월을 호출 IsLeapMonth 합니다.

using namespace System;
using namespace System::Globalization;
int main()
{
   
   // Creates and initializes a ThaiBuddhistCalendar.
   ThaiBuddhistCalendar^ myCal = gcnew ThaiBuddhistCalendar;
   
   // Checks all the months in five years in the current era.
   int iMonthsInYear;
   for ( int y = 2544; y <= 2548; y++ )
   {
      Console::Write( " {0}:\t", y );
      iMonthsInYear = myCal->GetMonthsInYear( y, ThaiBuddhistCalendar::CurrentEra );
      for ( int m = 1; m <= iMonthsInYear; m++ )
         Console::Write( "\t {0}", myCal->IsLeapMonth( y, m, ThaiBuddhistCalendar::CurrentEra ) );
      Console::WriteLine();

   }
}

/*
This code produces the following output.

2544:           False   False   False   False   False   False   False   False   False   False   False   False
2545:           False   False   False   False   False   False   False   False   False   False   False   False
2546:           False   False   False   False   False   False   False   False   False   False   False   False
2547:           False   False   False   False   False   False   False   False   False   False   False   False
2548:           False   False   False   False   False   False   False   False   False   False   False   False

*/
using System;
using System.Globalization;

public class SamplesThaiBuddhistCalendar  {

   public static void Main()  {

      // Creates and initializes a ThaiBuddhistCalendar.
      ThaiBuddhistCalendar myCal = new ThaiBuddhistCalendar();

      // Checks all the months in five years in the current era.
      int iMonthsInYear;
      for ( int y = 2544; y <= 2548; y++ )  {
         Console.Write( "{0}:\t", y );
         iMonthsInYear = myCal.GetMonthsInYear( y, ThaiBuddhistCalendar.CurrentEra );
         for ( int m = 1; m <= iMonthsInYear; m++ )
            Console.Write( "\t{0}", myCal.IsLeapMonth( y, m, ThaiBuddhistCalendar.CurrentEra ) );
         Console.WriteLine();
      }
   }
}

/*
This code produces the following output.

2544:           False   False   False   False   False   False   False   False   False   False   False   False
2545:           False   False   False   False   False   False   False   False   False   False   False   False
2546:           False   False   False   False   False   False   False   False   False   False   False   False
2547:           False   False   False   False   False   False   False   False   False   False   False   False
2548:           False   False   False   False   False   False   False   False   False   False   False   False

*/
Imports System.Globalization

Public Class SamplesThaiBuddhistCalendar   
   
   Public Shared Sub Main()

      ' Creates and initializes a ThaiBuddhistCalendar.
      Dim myCal As New ThaiBuddhistCalendar()

      ' Checks all the months in five years in the current era.
      Dim iMonthsInYear As Integer
      Dim y As Integer
      For y = 2544 To 2548
         Console.Write("{0}:" + ControlChars.Tab, y)
         iMonthsInYear = myCal.GetMonthsInYear(y, ThaiBuddhistCalendar.CurrentEra)
         Dim m As Integer
         For m = 1 To iMonthsInYear
            Console.Write(ControlChars.Tab + "{0}", myCal.IsLeapMonth(y, m, ThaiBuddhistCalendar.CurrentEra))
         Next m
         Console.WriteLine()
      Next y

   End Sub

End Class


'This code produces the following output.
'
'2544:           False   False   False   False   False   False   False   False   False   False   False   False
'2545:           False   False   False   False   False   False   False   False   False   False   False   False
'2546:           False   False   False   False   False   False   False   False   False   False   False   False
'2547:           False   False   False   False   False   False   False   False   False   False   False   False
'2548:           False   False   False   False   False   False   False   False   False   False   False   False

설명

태국 불교 달력의 윤년은 그레고리오력에서 동일한 윤년에 해당합니다. 그레고리오력의 윤년은 100으로 나눌 수 있는 경우를 제외하고 4로 균등하게 나눌 수 있는 그레고리오년으로 정의됩니다. 그러나 400으로 나눌 수 있는 그레고리오 년은 윤년입니다. 평년은 365일, 윤년은 366일입니다.

윤월은 윤년에만 발생하는 전체 월입니다. 태국 불교 달력에는 윤월이 없습니다.

적용 대상

추가 정보