HebrewCalendar 클래스

정의

히브리어 달력을 나타냅니다.

public ref class HebrewCalendar : System::Globalization::Calendar
public class HebrewCalendar : System.Globalization.Calendar
[System.Serializable]
public class HebrewCalendar : System.Globalization.Calendar
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class HebrewCalendar : System.Globalization.Calendar
type HebrewCalendar = class
    inherit Calendar
[<System.Serializable>]
type HebrewCalendar = class
    inherit Calendar
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type HebrewCalendar = class
    inherit Calendar
Public Class HebrewCalendar
Inherits Calendar
상속
HebrewCalendar
특성

예제

다음 예제에서는 클래스에서 지원하는 HebrewCalendar 날짜 범위가 포함된 파일을 만들고 각 월의 일 수(5772)를 표시합니다.

using System;
using System.Globalization;
using System.IO;
using System.Threading;

public class Example
{
   public static void Main()
   {
      StreamWriter output = new StreamWriter("HebrewCalendarInfo.txt");

      // Make the Hebrew Calendar the current calendar and
      // Hebrew (Israel) the current thread culture.
      HebrewCalendar hc = new HebrewCalendar();
      CultureInfo culture = CultureInfo.CreateSpecificCulture("he-IL");
      culture.DateTimeFormat.Calendar = hc;
      Thread.CurrentThread.CurrentCulture = culture;

      output.WriteLine("{0} Information:\n",
                       GetCalendarName(culture.DateTimeFormat.Calendar));

      // Get the calendar range expressed in both Hebrew calendar and
      // Gregorian calendar dates.
      output.WriteLine("Start Date: {0} ", hc.MinSupportedDateTime);
      culture.DateTimeFormat.Calendar = culture.Calendar;
      output.WriteLine("            ({0} Gregorian)\n",
                       hc.MinSupportedDateTime);

      culture.DateTimeFormat.Calendar = hc;
      output.WriteLine("End Date: {0} ", hc.MaxSupportedDateTime);
      culture.DateTimeFormat.Calendar = culture.Calendar;
      output.WriteLine("          ({0} Gregorian)\n",
                       hc.MaxSupportedDateTime);

      culture.DateTimeFormat.Calendar = hc;

      // Get the year in the Hebrew calendar that corresponds to 1/1/2012
      // and display information about it.
      DateTime startOfYear = new DateTime(2012, 1, 1);
      output.WriteLine("Days in the Year {0}: {1}\n",
                       hc.GetYear(startOfYear),
                       hc.GetDaysInYear(hc.GetYear(startOfYear)));

      output.WriteLine("Days in Each Month of {0}:\n", hc.GetYear(startOfYear));
      output.WriteLine("Month       Days       Month Name");
      // Change start of year to first day of first month
      startOfYear = hc.ToDateTime(hc.GetYear(startOfYear), 1, 1, 0, 0, 0, 0);
      DateTime startOfMonth = startOfYear;
      for (int ctr = 1; ctr <= hc.GetMonthsInYear(hc.GetYear(startOfYear)); ctr++) {
         output.Write(" {0,2}", ctr);
         output.WriteLine("{0,12}{1,15:MMM}",
                          hc.GetDaysInMonth(hc.GetYear(startOfMonth), hc.GetMonth(startOfMonth)),
                          startOfMonth);
         startOfMonth = hc.AddMonths(startOfMonth, 1);
      }

      output.Close();
   }

   private static string GetCalendarName(Calendar cal)
   {
      return cal.ToString().Replace("System.Globalization.", "").Replace("Cal", " Cal");
   }
}
// The example displays the following output:
//       Hebrew Calendar Information:
//
//       Start Date: ז// טבת שמ"ג 00:00:00
//                   (01/01/1583 00:00:00 Gregorian)
//
//       End Date: כ"ט אלול תתקצ"ט 23:59:59
//                 (29/09/2239 23:59:59 Gregorian)
//
//       Days in the Year 5772: 354
//
//       Days in Each Month of 5772:
//
//       Month       Days       Month Name
//         1          30           תשרי
//         2          29           חשון
//         3          30           כסלו
//         4          29            טבת
//         5          30            שבט
//         6          29            אדר
//         7          30           ניסן
//         8          29           אייר
//         9          30           סיון
//        10          29           תמוז
//        11          30             אב
//        12          29           אלול
Imports System.Globalization
Imports System.IO
Imports System.Threading

Module Example
   Public Sub Main()
      Dim output As New StreamWriter("HebrewCalendarInfo.txt")
      
      ' Make the Hebrew Calendar the current calendar and
      ' Hebrew (Israel) the current thread culture.
      Dim hc As New HebrewCalendar()
      Dim culture As CultureInfo = CultureInfo.CreateSpecificCulture("he-IL")
      culture.DateTimeFormat.Calendar = hc
      Thread.CurrentThread.CurrentCulture = culture
      
      output.WriteLine("{0} Information:", 
                       GetCalendarName(culture.DateTimeFormat.Calendar))
      output.WriteLine()
      
      ' Get the calendar range expressed in both Hebrew calendar and
      ' Gregorian calendar dates.
      output.WriteLine("Start Date: {0} ", 
                       hc.MinSupportedDateTime)  
      culture.DateTimeFormat.Calendar = culture.Calendar
      output.WriteLine("            ({0} Gregorian)", 
                       hc.MinSupportedDateTime)
      output.WriteLine()
      
      culture.DateTimeFormat.Calendar = hc
      output.WriteLine("End Date: {0} ", 
                   hc.MaxSupportedDateTime)
      culture.DateTimeFormat.Calendar = culture.Calendar
      output.WriteLine("          ({0} Gregorian)", 
                       hc.MaxSupportedDateTime)  
      output.WriteLine()
      
      culture.DateTimeFormat.Calendar = hc
      
      ' Get the year in the Hebrew calendar that corresponds to 1/1/2012
      ' and display information about it.
      Dim startOfYear As Date = #1/1/2012#
      output.WriteLine("Days in the Year {0}: {1}", 
                       hc.GetYear(startOfYear), 
                       hc.GetDaysInYear(hc.GetYear(startOfYear)))
      output.WriteLine()
      
      output.WriteLine("Days in Each Month of {0}:", hc.GetYear(startOfYear))
      output.WriteLine()
      output.WriteLine("Month       Days       Month Name")
      ' Change start of year to first day of first month 
      startOfYear = hc.ToDateTime(hc.GetYear(startOfYear), 1, 1, 0, 0, 0, 0)
      Dim startOfMonth As Date = startOfYear
      For ctr As Integer = 1 To hc.GetMonthsInYear(hc.GetYear(startOfYear)) 
         output.Write(" {0,2}", ctr)
         output.WriteLine("{0,12}{1,15:MMM}", 
                          hc.GetDaysInMonth(hc.GetYear(startOfMonth), hc.GetMonth(startOfMonth)),
                          startOfMonth)  
         startOfMonth = hc.AddMonths(startOfMonth, 1)                 
      Next 
                                     
      output.Close()          
   End Sub
   
   Private Function GetCalendarName(cal As Calendar) As String
      Return cal.ToString().Replace("System.Globalization.", "").Replace("Cal", " Cal")
   End Function
End Module
' The example displays the following output:
'       Hebrew Calendar Information:
'       
'       Start Date: ז' טבת שמ"ג 00:00:00 
'                   (01/01/1583 00:00:00 Gregorian)
'       
'       End Date: כ"ט אלול תתקצ"ט 23:59:59 
'                 (29/09/2239 23:59:59 Gregorian)
'       
'       Days in the Year 5772: 354
'       
'       Days in Each Month of 5772:
'       
'       Month       Days       Month Name
'         1          30           תשרי
'         2          29           חשון
'         3          30           כסלו
'         4          29            טבת
'         5          30            שבט
'         6          29            אדר
'         7          30           ניסן
'         8          29           אייר
'         9          30           סיון
'        10          29           תמוז
'        11          30             אב
'        12          29           אלול

이 예제에서는 개체를 HebrewCalendar 인스턴스화하고 히브리어(이스라엘) CultureInfo 개체의 현재 달력으로 만듭니다. 그런 다음 히브리어(이스라엘)를 현재의 문화로 만듭니다. 따라서 공용 언어 런타임은 히브리어 달력과 관련된 모든 날짜와 시간을 해석합니다.

설명

히브리어 달력은 B.C.E. 두 개의 연대를 인식합니다. (일반 시대 이전) 및 오전 (라틴어 "Anno Mundi"는 "세계의 해"를 의미합니다). 이 클래스의 HebrewCalendar 구현은 현재 시대(오전)와 히브리어 년 5343년에서 5999년(그레고리력에서는 1583년에서 2239년)만 인식합니다.

참고

.NET Framework 클래스 및 다른 일정 클래스를 사용하는 HebrewCalendar 방법에 대한 자세한 내용은 일정 작업을 참조하세요.

19세까지 균등하게 나눌 수 있는 연도로 끝나는 19년 주기마다 3번째, 6번째, 8번째, 11번째, 14년, 17년, 19년은 윤년입니다. 유대인 휴일의 배치에 따라 평년은 353일에서 355일로 할 수 있습니다. 윤년은 383일에서 385일로 할 수 있습니다.

히브리어 달력에는 평년 동안 12개월, 윤년 동안 13개월이 있습니다.

GetMonth 값(일반 연도) GetMonth 값(윤년) 일반적인 연도의 일 수 윤년의 일
1 1 (티슈라이) 30 30
2 2 (체슈반) 29/30 29/30
3 3 (키슬레프) 29/30 29/30
4 4 (테벳) 29 29
5 5 (셰바트) 30 30
6 - (아다르) 29 -
- 6 א(아다르 알레프) - 30
- 7 ב(아다르 베이트) - 29
7 8 (닛산) 30 30
8 9 (Iyar) 29 29
9 10 (시반) 30 30
10 11 (타무즈) 29 29
11 12 (Av) 30 30
12 13 (엘룰) 29 29

체슈반과 키슬레프의 날은 유대인 휴일의 배치에 따라 달라집니다. 윤년 동안, 아다르 알레프는 30일, 아다르 베이트(Adar Beit)는 29일로 대체됩니다. 아다르 알레프는 윤월로 간주됩니다. 아다르 알레프의 마지막 날과 아다르 베이트 (Adar Beit)의 모든 날은 윤일로 간주됩니다. 즉, 메서드가 IsLeapDay 요즘 반환 true 됩니다.

서기 2001년 1월 1일 날짜 의 그레고리오력은 5761 오전에 테벳의 여섯 번째 날에 해당합니다. 히브리어 달력에 있습니다.

각각 CultureInfo 은 일정 집합을 지원합니다. 속성 문화 Calendar 권에 대 한 기본 달력을 반환 하 고 OptionalCalendars 속성 문화권에서 지원 하는 모든 달력을 포함 하는 배열을 반환 합니다. 사용 하는 달력을 변경 하려면를 CultureInfo, 애플리케이션 설정 해야 합니다 Calendar 속성을 CultureInfo.DateTimeFormatCalendar합니다.

생성자

HebrewCalendar()

HebrewCalendar 클래스의 새 인스턴스를 초기화합니다.

필드

CurrentEra

현재 달력의 현재 연대를 나타냅니다. 이 필드의 값은 0입니다.

(다음에서 상속됨 Calendar)
HebrewEra

현재 연대를 나타냅니다. 이 필드는 상수입니다.

속성

AlgorithmType

현재 달력이 양력인지, 음력인지 또는 두 가지를 조합한 것인지를 나타내는 값을 가져옵니다.

AlgorithmType

현재 달력이 양력인지, 음력인지 또는 두 가지를 조합한 것인지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Calendar)
DaysInYearBeforeMinSupportedYear

MinSupportedDateTime 속성에서 지정한 연도 이전 연도의 일 수를 가져옵니다.

(다음에서 상속됨 Calendar)
Eras

HebrewCalendar에 있는 연대의 목록을 가져옵니다.

IsReadOnly

Calendar 개체가 읽기 전용인지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Calendar)
MaxSupportedDateTime

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

MaxSupportedDateTime

Calendar 개체에서 지원하는 마지막 날짜와 시간을 가져옵니다.

(다음에서 상속됨 Calendar)
MinSupportedDateTime

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

MinSupportedDateTime

Calendar 개체에서 지원하는 시작 날짜와 시간을 가져옵니다.

(다음에서 상속됨 Calendar)
TwoDigitYearMax

두 자릿수 연도로 표시할 수 있는 100년 범위의 마지막 연도를 가져오거나 설정합니다.

메서드

AddDays(DateTime, Int32)

지정된 DateTime에서 지정된 날짜 수만큼 경과한 DateTime을 반환합니다.

(다음에서 상속됨 Calendar)
AddHours(DateTime, Int32)

지정된 DateTime에서 지정된 시간 수만큼 경과한 DateTime을 반환합니다.

(다음에서 상속됨 Calendar)
AddMilliseconds(DateTime, Double)

지정된 DateTime에서 지정된 밀리초 수만큼 경과한 DateTime을 반환합니다.

(다음에서 상속됨 Calendar)
AddMinutes(DateTime, Int32)

지정된 DateTime에서 지정된 분 수만큼 경과한 DateTime을 반환합니다.

(다음에서 상속됨 Calendar)
AddMonths(DateTime, Int32)

지정된 DateTime에서 지정된 월 수만큼 경과한 DateTime을 반환합니다.

AddSeconds(DateTime, Int32)

지정된 DateTime에서 지정된 초 수만큼 경과한 DateTime을 반환합니다.

(다음에서 상속됨 Calendar)
AddWeeks(DateTime, Int32)

지정된 DateTime에서 지정된 주 수만큼 경과한 DateTime을 반환합니다.

(다음에서 상속됨 Calendar)
AddYears(DateTime, Int32)

지정된 DateTime에서 지정된 연도 수만큼 경과한 DateTime을 반환합니다.

Clone()

현재 Calendar 개체의 복사본인 새 개체를 만듭니다.

(다음에서 상속됨 Calendar)
Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetDayOfMonth(DateTime)

지정된 DateTime의 날짜(월 기준)를 반환합니다.

GetDayOfWeek(DateTime)

지정된 DateTime의 요일을 반환합니다.

GetDayOfYear(DateTime)

지정된 DateTime의 날짜(연도 기준)를 반환합니다.

GetDaysInMonth(Int32, Int32)

현재 연대의 지정된 연도 및 월에 있는 일 수를 반환합니다.

(다음에서 상속됨 Calendar)
GetDaysInMonth(Int32, Int32, Int32)

지정된 연대의 지정된 연도에 있는 지정된 월의 날짜 수를 반환합니다.

GetDaysInYear(Int32)

현재 연대의 지정된 연도에 있는 일 수를 반환합니다.

(다음에서 상속됨 Calendar)
GetDaysInYear(Int32, Int32)

지정된 연대에 있는 지정된 연도의 날짜 수를 반환합니다.

GetEra(DateTime)

지정된 DateTime의 연대를 반환합니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetHour(DateTime)

지정된 DateTime의 시간 값을 반환합니다.

(다음에서 상속됨 Calendar)
GetLeapMonth(Int32)

지정된 연도의 윤월을 계산합니다.

(다음에서 상속됨 Calendar)
GetLeapMonth(Int32, Int32)

지정한 연도 및 연대의 윤월을 계산합니다.

GetLeapMonth(Int32, Int32)

지정한 연도 및 연대의 윤월을 계산합니다.

(다음에서 상속됨 Calendar)
GetMilliseconds(DateTime)

지정된 DateTime의 밀리초 값을 반환합니다.

(다음에서 상속됨 Calendar)
GetMinute(DateTime)

지정된 DateTime의 분 값을 반환합니다.

(다음에서 상속됨 Calendar)
GetMonth(DateTime)

지정된 DateTime의 월을 반환합니다.

GetMonthsInYear(Int32)

현재 연대에 있는 지정된 연도의 월 수를 반환합니다.

(다음에서 상속됨 Calendar)
GetMonthsInYear(Int32, Int32)

지정된 연대에 있는 지정된 연도의 월 수를 반환합니다.

GetSecond(DateTime)

지정된 DateTime의 초 값을 반환합니다.

(다음에서 상속됨 Calendar)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)

지정된 DateTime 값의 날짜가 포함된 주(연도 기준)를 반환합니다.

(다음에서 상속됨 Calendar)
GetYear(DateTime)

지정된 DateTime 값의 연도를 반환합니다.

IsLeapDay(Int32, Int32, Int32)

현재 연대의 지정된 날짜가 윤일인지 여부를 확인합니다.

(다음에서 상속됨 Calendar)
IsLeapDay(Int32, Int32, Int32, Int32)

지정된 연대의 지정된 날짜가 윤일인지 여부를 확인합니다.

IsLeapMonth(Int32, Int32)

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

(다음에서 상속됨 Calendar)
IsLeapMonth(Int32, Int32, Int32)

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

IsLeapYear(Int32)

지정된 연대의 지정된 연도가 윤년인지 여부를 확인합니다.

(다음에서 상속됨 Calendar)
IsLeapYear(Int32, Int32)

지정된 연대의 지정된 연도가 윤년인지 여부를 확인합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

현재 연대의 지정된 날짜와 시간으로 설정된 DateTime을 반환합니다.

(다음에서 상속됨 Calendar)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)

지정된 연대의 지정된 날짜와 시간으로 설정된 DateTime을 반환합니다.

ToFourDigitYear(Int32)

TwoDigitYearMax 속성으로 해당 세기를 확인하여 지정된 연도를 네 자릿수 연도로 변환합니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보