HebrewCalendar.IsLeapMonth(Int32, Int32, Int32) Metode

Definisi

Menentukan apakah bulan yang ditentukan dalam tahun yang ditentukan di era yang ditentukan adalah bulan kampung.

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

Parameter

year
Int32

Bilangan bulat yang mewakili tahun.

month
Int32

Bilangan bulat dari 1 hingga 13 yang mewakili bulan.

era
Int32

Bilangan bulat yang mewakili era. Tentukan antara HebrewEra atau HebrewCalendar.Eras[Calendar.CurrentEra].

Mengembalikan

true jika bulan yang ditentukan adalah bulan kampung; jika tidak, false.

Pengecualian

year, month, atau era berada di luar rentang yang didukung oleh kalender ini.

Contoh

Contoh kode berikut memanggil IsLeapMonth semua bulan dalam lima tahun di era saat ini.

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

   }
}

/*
This code produces the following output.

5761:           False   False   False   False   False   False   False   False   False   False   False   False
5762:           False   False   False   False   False   False   False   False   False   False   False   False
5763:           False   False   False   False   False   False   True    False   False   False   False   False   False
5764:           False   False   False   False   False   False   False   False   False   False   False   False
5765:           False   False   False   False   False   False   True    False   False   False   False   False   False

*/
using System;
using System.Globalization;

public class SamplesHebrewCalendar  {

   public static void Main()  {

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

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

/*
This code produces the following output.

5761:           False   False   False   False   False   False   False   False   False   False   False   False
5762:           False   False   False   False   False   False   False   False   False   False   False   False
5763:           False   False   False   False   False   False   True    False   False   False   False   False   False
5764:           False   False   False   False   False   False   False   False   False   False   False   False
5765:           False   False   False   False   False   False   True    False   False   False   False   False   False

*/
Imports System.Globalization

Public Class SamplesHebrewCalendar   
   
   Public Shared Sub Main()

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

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

   End Sub

End Class


'This code produces the following output.
'
'5761:           False   False   False   False   False   False   False   False   False   False   False   False
'5762:           False   False   False   False   False   False   False   False   False   False   False   False
'5763:           False   False   False   False   False   False   True    False   False   False   False   False   False
'5764:           False   False   False   False   False   False   False   False   False   False   False   False
'5765:           False   False   False   False   False   False   True    False   False   False   False   False   False

Keterangan

Implementasi HebrewCalendar kelas ini hanya mengenali tahun Ibrani 5343 hingga 5999 (1583 hingga 2239 di kalender Gregorian).

Dalam setiap siklus 19 tahun yang berakhir dengan tahun yang terbagi merata sebesar 19, tahun ke-3, ke-6, ke-8, ke-11, ke-14, ke-17, dan ke-19 adalah tahun kabut. Tahun umum dapat memiliki dari 353 hingga 355 hari, tergantung pada penempatan liburan Yahudi. Tahun karang dapat memiliki dari 383 hingga 385 hari.

Bulan kampung adalah sebulan penuh yang hanya terjadi pada tahun kampung. Di kalender Ibrani, Adar Beit adalah satu-satunya bulan kampung.

Berlaku untuk

Lihat juga