PersianCalendar PersianCalendar PersianCalendar PersianCalendar Class

정의

페르시아력을 나타냅니다.Represents the Persian calendar.

public ref class PersianCalendar : System::Globalization::Calendar
[System.Serializable]
public class PersianCalendar : System.Globalization.Calendar
type PersianCalendar = class
    inherit Calendar
Public Class PersianCalendar
Inherits Calendar
상속
PersianCalendarPersianCalendarPersianCalendarPersianCalendar
특성

예제

다음 예제에서는 DateTime 사용 하 여 개체를 DateTime.Now 속성을 DateTime 생성자 및 페르시아 력의 ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) 메서드.The following example instantiates DateTime objects by using the DateTime.Now property, a DateTime constructor, and the Persian calendar's ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) method. 양력 및 페르시아어 달력에이 날짜를 표시합니다.It then displays these dates in both the Gregorian and Persian calendars. 또한 페르시아 력의 날짜 범위를 표시합니다.It also displays the date range of the Persian calendar.

using System;
using System.Globalization;

public class Example
{
   public static void Main()
   {
        PersianCalendar pc = new PersianCalendar();
        DateTime thisDate = DateTime.Now;

        // Display the current date using the Gregorian and Persian calendars. 
        Console.WriteLine("Today in the Gregorian Calendar:  {0:dddd}, {0}", thisDate);
        Console.WriteLine("Today in the Persian Calendar:    {0}, {1}/{2}/{3} {4}:{5}:{6}\n",  
                      pc.GetDayOfWeek(thisDate), 
                      pc.GetMonth(thisDate), 
                      pc.GetDayOfMonth(thisDate),  
                      pc.GetYear(thisDate), 
                      pc.GetHour(thisDate), 
                      pc.GetMinute(thisDate), 
                      pc.GetSecond(thisDate));
        
        // Create a date using the Gregorian calendar.
        thisDate = new DateTime(2013, 5, 28, 10, 35, 0);
        Console.WriteLine("Gregorian Calendar:  {0:D} ", thisDate);
        Console.WriteLine("Persian Calendar:    {0}, {1}/{2}/{3} {4}:{5}:{6}\n",  
                          pc.GetDayOfWeek(thisDate), 
                          pc.GetMonth(thisDate), 
                          pc.GetDayOfMonth(thisDate),  
                          pc.GetYear(thisDate), 
                          pc.GetHour(thisDate), 
                          pc.GetMinute(thisDate), 
                          pc.GetSecond(thisDate));
         
        // Create a date using the Persian calendar.
        thisDate = pc.ToDateTime(1395, 4, 22, 12, 30, 0, 0);
        Console.WriteLine("Gregorian Calendar:  {0:D} ", thisDate);
        Console.WriteLine("Persian Calendar:    {0}, {1}/{2}/{3} {4}:{5}:{6}\n",  
                      pc.GetDayOfWeek(thisDate), 
                      pc.GetMonth(thisDate), 
                      pc.GetDayOfMonth(thisDate),  
                      pc.GetYear(thisDate), 
                      pc.GetHour(thisDate), 
                      pc.GetMinute(thisDate), 
                      pc.GetSecond(thisDate));
        
        // Show the Persian Calendar date range.
        Console.WriteLine("Minimum Persian Calendar date (Gregorian Calendar):  {0:D} ", 
                          pc.MinSupportedDateTime);
        Console.WriteLine("Minimum Persian Calendar date (Persian Calendar):  " +    
                          "{0}, {1}/{2}/{3} {4}:{5}:{6}\n",  
                          pc.GetDayOfWeek(pc.MinSupportedDateTime), 
                          pc.GetMonth(pc.MinSupportedDateTime), 
                          pc.GetDayOfMonth(pc.MinSupportedDateTime),  
                          pc.GetYear(pc.MinSupportedDateTime), 
                          pc.GetHour(pc.MinSupportedDateTime), 
                          pc.GetMinute(pc.MinSupportedDateTime), 
                          pc.GetSecond(pc.MinSupportedDateTime));
        
        Console.WriteLine("Maximum Persian Calendar date (Gregorian Calendar):  {0:D} ", 
                          pc.MaxSupportedDateTime);
        Console.WriteLine("Maximum Persian Calendar date (Persian Calendar):  " +   
                          "{0}, {1}/{2}/{3} {4}:{5}:{6}\n",  
                          pc.GetDayOfWeek(pc.MaxSupportedDateTime), 
                          pc.GetMonth(pc.MaxSupportedDateTime), 
                          pc.GetDayOfMonth(pc.MaxSupportedDateTime),  
                          pc.GetYear(pc.MaxSupportedDateTime), 
                          pc.GetHour(pc.MinSupportedDateTime), 
                          pc.GetMinute(pc.MaxSupportedDateTime), 
                          pc.GetSecond(pc.MaxSupportedDateTime));
   }
}
// The example displays the following output when run under the .NET Framework 4.6:
//    Today in the Gregorian Calendar:  Monday, 2/4/2013 9:11:36 AM
//    Today in the Persian Calendar:    Monday, 11/16/1391 9:11:36
//
//    Gregorian Calendar:  Tuesday, May 28, 2013
//    Persian Calendar:    Tuesday, 3/7/1392 10:35:0
//
//    Gregorian Calendar:  Tuesday, July 12, 2016
//    Persian Calendar:    Tuesday, 4/22/1395 12:30:0
//
//    Minimum Persian Calendar date (Gregorian Calendar):  Friday, March 22, 0622
//    Minimum Persian Calendar date (Persian Calendar):  Friday, 1/1/1 0:0:0
//
//    Maximum Persian Calendar date (Gregorian Calendar):  Friday, December 31, 9999
//    Maximum Persian Calendar date (Persian Calendar):  Friday, 10/13/9378 0:59:59
//
// The example displays the following output when run under versions of
// the .NET Framework before the .NET Framework 4.6:
//    Today in the Gregorian Calendar:  Monday, 2/4/2013 9:11:36 AM
//    Today in the Persian Calendar:    Monday, 11/16/1391 9:11:36
//    
//    Gregorian Calendar:  Tuesday, May 28, 2013
//    Persian Calendar:    Tuesday, 3/7/1392 10:35:0
//    
//    Gregorian Calendar:  Tuesday, July 12, 2016
//    Persian Calendar:    Tuesday, 4/22/1395 12:30:0
//    
//    Minimum Persian Calendar date (Gregorian Calendar):  Thursday, March 21, 0622
//    Minimum Persian Calendar date (Persian Calendar):  Thursday, 1/1/1 0:0:0
//    
//    Maximum Persian Calendar date (Gregorian Calendar):  Friday, December 31, 9999
//    Maximum Persian Calendar date (Persian Calendar):  Friday, 10/10/9378 0:59:59
Imports System.Globalization

Module Example
    Public Sub Main()
        Dim pc As New PersianCalendar()
        Dim thisDate As Date = Date.Now

        ' Display the current date using the Gregorian and Persian calendars. 
        Console.WriteLine("Today in the Gregorian Calendar:  {0:dddd}, {0}", thisDate)
        Console.WriteLine("Today in the Persian Calendar:    {0}, {1}/{2}/{3} {4}:{5}:{6}",  
                      pc.GetDayOfWeek(thisDate),
                      pc.GetMonth(thisDate),
                      pc.GetDayOfMonth(thisDate), 
                      pc.GetYear(thisDate),
                      pc.GetHour(thisDate),
                      pc.GetMinute(thisDate),
                      pc.GetSecond(thisDate))
        Console.WriteLine()
        
        ' Create a date using the Gregorian calendar.
        thisDate = New DateTime(2013, 5, 28, 10, 35, 0)
        Console.WriteLine("Gregorian Calendar:  {0:D} ", thisDate)
        Console.WriteLine("Persian Calendar:    {0}, {1}/{2}/{3} {4}:{5}:{6}", 
                      pc.GetDayOfWeek(thisDate),
                      pc.GetMonth(thisDate),
                      pc.GetDayOfMonth(thisDate), 
                      pc.GetYear(thisDate),
                      pc.GetHour(thisDate),
                      pc.GetMinute(thisDate),
                      pc.GetSecond(thisDate))
        Console.WriteLine()
         
        ' Create a date using the Persian calendar.
        thisDate = pc.ToDateTime(1395, 4, 22, 12, 30, 0, 0)
        Console.WriteLine("Gregorian Calendar:  {0:D} ", thisDate)
        Console.WriteLine("Persian Calendar:    {0}, {1}/{2}/{3} {4}:{5}:{6}", 
                      pc.GetDayOfWeek(thisDate),
                      pc.GetMonth(thisDate),
                      pc.GetDayOfMonth(thisDate), 
                      pc.GetYear(thisDate),
                      pc.GetHour(thisDate),
                      pc.GetMinute(thisDate),
                      pc.GetSecond(thisDate))
        Console.WriteLine()
        
        ' Show the Persian Calendar date range.
        Console.WriteLine("Minimum Persian Calendar date (Gregorian Calendar):  {0:D} ", 
                          pc.MinSupportedDateTime)
        Console.WriteLine("Minimum Persian Calendar date (Persian Calendar):  " +    
                          "{0}, {1}/{2}/{3} {4}:{5}:{6}",  
                          pc.GetDayOfWeek(pc.MinSupportedDateTime), 
                          pc.GetMonth(pc.MinSupportedDateTime), 
                          pc.GetDayOfMonth(pc.MinSupportedDateTime),  
                          pc.GetYear(pc.MinSupportedDateTime), 
                          pc.GetHour(pc.MinSupportedDateTime), 
                          pc.GetMinute(pc.MinSupportedDateTime), 
                          pc.GetSecond(pc.MinSupportedDateTime))
        Console.WriteLine()
        
        Console.WriteLine("Maximum Persian Calendar date (Gregorian Calendar):  {0:D} ", 
                          pc.MaxSupportedDateTime)
        Console.WriteLine("Maximum Persian Calendar date (Persian Calendar):  " +   
                          "{0}, {1}/{2}/{3} {4}:{5}:{6}",  
                          pc.GetDayOfWeek(pc.MaxSupportedDateTime), 
                          pc.GetMonth(pc.MaxSupportedDateTime), 
                          pc.GetDayOfMonth(pc.MaxSupportedDateTime),  
                          pc.GetYear(pc.MaxSupportedDateTime), 
                          pc.GetHour(pc.MinSupportedDateTime), 
                          pc.GetMinute(pc.MaxSupportedDateTime), 
                          pc.GetSecond(pc.MaxSupportedDateTime))
        Console.WriteLine()
    End Sub
End Module 
' The example displays the following output when run under the .NET Framework 4.6:
'    Today in the Gregorian Calendar:  Monday, 2/4/2013 9:11:36 AM
'    Today in the Persian Calendar:    Monday, 11/16/1391 9:11:36
'
'    Gregorian Calendar:  Tuesday, May 28, 2013
'    Persian Calendar:    Tuesday, 3/7/1392 10:35:0
'
'    Gregorian Calendar:  Tuesday, July 12, 2016
'    Persian Calendar:    Tuesday, 4/22/1395 12:30:0
'
'    Minimum Persian Calendar date (Gregorian Calendar):  Friday, March 22, 0622
'    Minimum Persian Calendar date (Persian Calendar):  Friday, 1/1/1 0:0:0
'
'    Maximum Persian Calendar date (Gregorian Calendar):  Friday, December 31, 9999
'    Maximum Persian Calendar date (Persian Calendar):  Friday, 10/13/9378 0:59:59
'
' The example displays the following output when run under versions of
' the .NET Framework before the .NET Framework 4.6:
'    Today in the Gregorian Calendar:  Monday, 2/4/2013 9:11:36 AM
'    Today in the Persian Calendar:    Monday, 11/16/1391 9:11:36
'
'    Gregorian Calendar:  Tuesday, May 28, 2013
'    Persian Calendar:    Tuesday, 3/7/1392 10:35:0
'
'    Gregorian Calendar:  Tuesday, July 12, 2016
'    Persian Calendar:    Tuesday, 4/22/1395 12:30:0
'
'    Minimum Persian Calendar date (Gregorian Calendar):  Thursday, March 21, 0622
'    Minimum Persian Calendar date (Persian Calendar):  Thursday, 1/1/1 0:0:0
'
'    Maximum Persian Calendar date (Gregorian Calendar):  Friday, December 31, 9999
'    Maximum Persian Calendar date (Persian Calendar):  Friday, 10/10/9378 0:59:59

다음 예제에서는의 필드, 속성 및 메서드 멤버는 PersianCalendar 클래스입니다.The following example demonstrates the field, property, and method members of the PersianCalendar class.

using System;
using System.Globalization;
 
class Sample 
{
    public static void Main() 
    {
      PersianCalendar jc = new PersianCalendar();
      DateTime thisDate = DateTime.Now;
 
		//--------------------------------------------------------------------------------
		// Properties
		//--------------------------------------------------------------------------------
      Console.WriteLine("\n........... Selected Properties .....................\n");
      Console.Write("Eras:");
      foreach (int era in jc.Eras)
      {
         Console.WriteLine(" era = {0}", era);
      }
		//--------------------------------------------------------------------------------
      Console.WriteLine("\nTwoDigitYearMax = {0}", jc.TwoDigitYearMax);
		//--------------------------------------------------------------------------------
		// Methods
		//--------------------------------------------------------------------------------
      Console.WriteLine("\n............ Selected Methods .......................\n");
 
		//--------------------------------------------------------------------------------
      Console.WriteLine("GetDayOfYear: day = {0}", jc.GetDayOfYear(thisDate));
		//--------------------------------------------------------------------------------
      Console.WriteLine("GetDaysInMonth: days = {0}", 
                        jc.GetDaysInMonth( thisDate.Year, thisDate.Month, 
                        PersianCalendar.PersianEra));
		//--------------------------------------------------------------------------------
      Console.WriteLine("GetDaysInYear: days = {0}", 
                        jc.GetDaysInYear(thisDate.Year, PersianCalendar.PersianEra));
		//--------------------------------------------------------------------------------
      Console.WriteLine("GetLeapMonth: leap month (if any) = {0}", 
                        jc.GetLeapMonth(thisDate.Year, PersianCalendar.PersianEra));
		//-------------------------------------------------------------
      Console.WriteLine("GetMonthsInYear: months in a year = {0}", 
                        jc.GetMonthsInYear(thisDate.Year, PersianCalendar.PersianEra));
		//--------------------------------------------------------------------------------
      Console.WriteLine("IsLeapDay: This is a leap day = {0}", 
                        jc.IsLeapDay(thisDate.Year, thisDate.Month, thisDate.Day, 
                        PersianCalendar.PersianEra));
		//--------------------------------------------------------------------------------
      Console.WriteLine("IsLeapMonth: This is a leap month = {0}", 
                        jc.IsLeapMonth(thisDate.Year, thisDate.Month, 
                        PersianCalendar.PersianEra));
		//--------------------------------------------------------------------------------
      Console.WriteLine("IsLeapYear: 1370 is a leap year = {0}", 
                        jc.IsLeapYear(1370, PersianCalendar.PersianEra));
		//--------------------------------------------------------------------------------
 
		// Get the 4-digit year for a year whose last two digits are 99. The 4-digit year 
		// depends on the current value of the TwoDigitYearMax property.
 
      Console.WriteLine("ToFourDigitYear:");
      Console.WriteLine("  If TwoDigitYearMax = {0}, ToFourDigitYear(99) = {1}", 
                         jc.TwoDigitYearMax, jc.ToFourDigitYear(99));
      jc.TwoDigitYearMax = thisDate.Year;
      Console.WriteLine("  If TwoDigitYearMax = {0}, ToFourDigitYear(99) = {1}", 
                        jc.TwoDigitYearMax, jc.ToFourDigitYear(99));
    }
}
// The example displays the following output:
//       ........... Selected Properties .....................
//       
//       Eras: era = 1
//       
//       TwoDigitYearMax = 99
//       
//       ............ Selected Methods .......................
//       
//       GetDayOfYear: day = 1
//       GetDaysInMonth: days = 31
//       GetDaysInYear: days = 365
//       GetLeapMonth: leap month (if any) = 0
//       GetMonthsInYear: months in a year = 12
//       IsLeapDay: This is a leap day = False
//       IsLeapMonth: This is a leap month = False
//       IsLeapYear: 1370 is a leap year = True
//       ToFourDigitYear:
//         If TwoDigitYearMax = 99, ToFourDigitYear(99) = 99
//         If TwoDigitYearMax = 2012, ToFourDigitYear(99) = 1999
Imports System.Globalization

Class Sample
    Public Shared Sub Main()
        '--------------------------------------------------------------------------------
        ' Get today's date.
        '--------------------------------------------------------------------------------
        Dim jc As New PersianCalendar()
        Dim thisDate As Date = Date.Now

        '--------------------------------------------------------------------------------
        ' Properties
        '--------------------------------------------------------------------------------
        Console.WriteLine(vbCrLf & _
                          "........... Selected Properties ....................." & vbCrLf)
        Console.Write("Eras:")
        Dim era As Integer
        For Each era In jc.Eras
            Console.WriteLine(" era = {0}", era)
        Next era
        '--------------------------------------------------------------------------------
        Console.WriteLine("TwoDigitYearMax = {0}", jc.TwoDigitYearMax)
        '--------------------------------------------------------------------------------
        ' Methods
        '--------------------------------------------------------------------------------
        Console.WriteLine(vbCrLf & _
                          "............ Selected Methods ......................." & vbCrLf)

        '--------------------------------------------------------------------------------
        Console.WriteLine("GetDayOfYear: day = {0}", jc.GetDayOfYear(thisDate))
        '--------------------------------------------------------------------------------

        Console.WriteLine("GetDaysInMonth: days = {0}", _
                           jc.GetDaysInMonth(thisDate.Year, _
                                             thisDate.Month, _
                                             PersianCalendar.PersianEra))
        '--------------------------------------------------------------------------------
        Console.WriteLine("GetDaysInYear: days = {0}", _
                          jc.GetDaysInYear(thisDate.Year, PersianCalendar.PersianEra))
        '--------------------------------------------------------------------------------
        Console.WriteLine("GetLeapMonth: leap month (if any) = {0}", _
                           jc.GetLeapMonth(thisDate.Year, PersianCalendar.PersianEra))
        '--------------------------------------------------------------------------------
        Console.WriteLine("GetMonthsInYear: months in a year = {0}", _
                           jc.GetMonthsInYear(thisDate.Year, PersianCalendar.PersianEra))
        '--------------------------------------------------------------------------------
        Console.WriteLine("IsLeapDay: This is a leap day = {0}", _
                           jc.IsLeapDay(thisDate.Year, _
                                        thisDate.Month, thisDate.Day, _
                                        PersianCalendar.PersianEra))
        '--------------------------------------------------------------------------------
        Console.WriteLine("IsLeapMonth: This is a leap month = {0}", _
                           jc.IsLeapMonth(thisDate.Year, _
                                          thisDate.Month, _
                                          PersianCalendar.PersianEra))
        '--------------------------------------------------------------------------------
        Console.WriteLine("IsLeapYear: 1370 is a leap year = {0}", _
                           jc.IsLeapYear(1370, PersianCalendar.PersianEra))
        '--------------------------------------------------------------------------------

        ' Get the 4-digit year for a year whose last two digits are 99. The 4-digit year 
        ' depends on the current value of the TwoDigitYearMax property.

        Console.WriteLine("ToFourDigitYear:")
        Console.WriteLine("  If TwoDigitYearMax = {0}, ToFourDigitYear(99) = {1}", _
                          jc.TwoDigitYearMax, jc.ToFourDigitYear(99))
        jc.TwoDigitYearMax = thisDate.Year
        Console.WriteLine("  If TwoDigitYearMax = {0}, ToFourDigitYear(99) = {1}", _
                          jc.TwoDigitYearMax, jc.ToFourDigitYear(99))
    End Sub
End Class 
' The example displays output like the following: 
'       ........... Seleted Properties .....................
'       
'       Eras: era = 1
'       
'       TwoDigitYearMax = 99
'       
'       ............ Selected Methods .......................
'       
'       GetDayOfYear: day = 1
'       GetDaysInMonth: days = 31
'       GetDaysInYear: days = 365
'       GetLeapMonth: leap month (if any) = 0
'       GetMonthsInYear: months in a year = 12
'       IsLeapDay: This is a leap day = False
'       IsLeapMonth: This is a leap month = False
'       IsLeapYear: 1370 is a leap year = True
'       ToFourDigitYear:
'         If TwoDigitYearMax = 99, ToFourDigitYear(99) = 99
'         If TwoDigitYearMax = 2012, ToFourDigitYear(99) = 1999

설명

일부 지역에서는 다른 월 이름을 사용 하지만 페르시아 력의 Persian를 말하기는 대부분의 국가에서 사용 됩니다.The Persian calendar is used in most countries where Persian is spoken, although some regions use different month names. 페르시아력을 이란과 아프가니스탄의 공식 달력 및 카자흐스탄, 타지 키스탄 같은 지역의 다른 달력 중 하나입니다.The Persian calendar is the official calendar of Iran and Afghanistan, and it is one of the alternative calendars in regions such as Kazakhstan and Tajikistan.

참고

사용에 관한 정보를 PersianCalendar 클래스와 다른 달력.NET Framework의 클래스를 참조 하십시오 달력 작업합니다.For information about using the PersianCalendar class and the other calendar classes in the .NET Framework, see Working with Calendars.

페르시아 력의 날짜 헤 622에 해당 하는 연도의 시작 기Dates in the Persian calendar start from the year of the Hijra, which corresponds to 622 C.E. 고 무하마드 (PBUH) 메카에서 메디 나로 이주한 연도입니다.and is the year when Muhammad (PBUH) migrated from Mecca to Medina. 예를 들어 날짜 기 2002 년 3 월 21 일For example, the date March 21, 2002 C.E. 1381 Anno Persico 파라 바 하르 연도 월의 첫날에 해당합니다.corresponds to the first day of the month of Farvardeen in the year 1381 Anno Persico.

페르시아 태양 년을 기반으로 하 고 길이 약 365 일입니다.The Persian calendar is based on a solar year and is approximately 365 days long. 연간 4 계절을 순환 하 고 지구 중심에서 본으로 북반구를 지 나 남반구에서 적도 교차 하는 sun 표시 되 면 새 해를 시작 합니다.A year cycles through four seasons, and a new year begins when the sun appears to cross the equator from the southern hemisphere to the northern hemisphere as viewed from the center of the Earth. 새 해 첫 번째 요일을 파라 바 하르, 북반구에서 spring의 첫 번째 날짜의 월을 표시 합니다.The new year marks the first day of the month of Farvardeen, which is the first day of spring in the northern hemisphere.

각 페르시아 력의 6 개월은 31 일, 앞으로 5 개월 각각의 30 일 및 연도가 윤년에 평년에서 및 30 일 동안 29 일까 지는 지난 달Each of the first six months in the Persian calendar has 31 days, each of the next five months has 30 days, and the last month has 29 days in a common year and 30 days in a leap year. 연도가 윤년 인지, 33으로 나누었을 때 나머지가 1, 5, 9, 13, 17, 22, 26, 또는 30입니다.A leap year is a year that, when divided by 33, has a remainder of 1, 5, 9, 13, 17, 22, 26, or 30. 예를 들어 1370 연도가 윤년을 33으로 나누면 나머지가 17 생성 하기 때문에 합니다.For example, the year 1370 is a leap year because dividing it by 33 yields a remainder of 17. 33-년 주기로 약 8 윤 년이 있습니다.There are approximately eight leap years in every 33-year cycle.

PersianCalendar 클래스 및.NET Framework 버전The PersianCalendar class and .NET Framework versions

로 시작 합니다 .NET Framework 4.6.NET Framework 4.6, PersianCalendar 클래스 observational 알고리즘 보다는 회교식 양력 천문학 알고리즘을 사용 하 여 날짜를 계산 하 합니다.Starting with the .NET Framework 4.6.NET Framework 4.6, the PersianCalendar class uses the Hijri solar astronomical algorithm rather than an observational algorithm to calculate dates. 이렇게 하면는 PersianCalendar 이란과 아프가니스탄, 페르시아 력의 가장 널리 사용에서의 두 국가에서 사용 중인 페르시아 력으로 일관 된 구현입니다.This makes the PersianCalendar implementation consistent with the Persian calendar in use in Iran and Afghanistan, the two countries in which the Persian calendar is in most widespread use. .NET Framework 4 또는 이상을 실행 하는 모든 앱에 변경 내용이 적용을 .NET Framework 4.6.NET Framework 4.6 설치 됩니다.The change affects all apps running on the .NET Framework 4 or later if the .NET Framework 4.6.NET Framework 4.6 is installed.

결과로 변경 된 알고리즘:As a result of the changed algorithm:

  • 두 알고리즘 1800 사이 2123 그레고리오 력으로 날짜를 변환 하는 경우 동일한 결과 반환 해야 합니다.The two algorithms should return identical results when converting dates between 1800 and 2123 in the Gregorian calendar.

  • 두 알고리즘 1800 전후 2123 그레고리오 력으로 날짜를 변환 하는 경우 다른 결과 반환할 수 있습니다.The two algorithms may return different results when converting dates before 1800 and after 2123 in the Gregorian calendar.

  • MinSupportedDateTime 속성 값에서에서 변경 되었습니다 0622 년 3 월 21, 양력에서 0622 년 3 월 22, 양력에서입니다.The MinSupportedDateTime property value has changed from March 21, 0622 in the Gregorian calendar to March 22, 0622 in the Gregorian calendar.

  • MaxSupportedDateTime 페르시아 력의 9378 년의 10 월 13 일에 페르시아 력의 9378 년 10 월 10 일 날부터 속성 값이 변경 합니다.The MaxSupportedDateTime property value has changed from the 10th day of the 10th month of the year 9378 in the Persian calendar to the 13th day of the 10th month of the year 9378 in the Persian calendar.

  • IsLeapYear 에 이전 보다 메서드를 서로 다른 결과 반환할 수 있습니다.The IsLeapYear method may return a different result than it did previously.

PersianCalendar 클래스 사용Using the PersianCalendar class

응용 프로그램 사용을 PersianCalendar 페르시아 력의 날짜를 계산 하거나 양력 날짜와 페르시아 날짜를 변환 하는 개체입니다.Applications use a PersianCalendar object to calculate dates in the Persian calendar or convert Persian dates to and from Gregorian dates.

사용할 수 없습니다는 PersianCalendar 문화권의 기본 달력으로는 개체입니다.You cannot use a PersianCalendar object as the default calendar for a culture. 기본 달력으로 지정 된 합니다 CultureInfo.Calendar 속성에서 반환 되는 달력 중 하나 여야 합니다는 CultureInfo.OptionalCalendars 속성입니다.The default calendar is specified by the CultureInfo.Calendar property and must be one of the calendars returned by the CultureInfo.OptionalCalendars property. 현재는 PersianCalendar 클래스에서 지 원하는 모든 culture에 대 한 선택적인 달력 아닙니다는 CultureInfo 클래스 및 기본 달력이 될 수 없습니다.Currently, the PersianCalendar class is not an optional calendar for any culture supported by the CultureInfo class and consequently cannot be a default calendar.

생성자

PersianCalendar() PersianCalendar() PersianCalendar() PersianCalendar()

PersianCalendar 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the PersianCalendar class.

필드

CurrentEra CurrentEra CurrentEra CurrentEra

현재 달력의 현재 연대를 나타냅니다.Represents the current era of the current calendar. 이 필드의 값은 0입니다.The value of this field is 0.

(Inherited from Calendar)
PersianEra PersianEra PersianEra PersianEra

현재 연대를 나타냅니다.Represents the current era. 이 필드는 상수입니다.This field is constant.

속성

AlgorithmType AlgorithmType AlgorithmType AlgorithmType

현재 달력이 양력인지, 음력인지 또는 음양력인지를 나타내는 값을 가져옵니다.Gets a value indicating whether the current calendar is solar-based, lunar-based, or lunisolar-based.

DaysInYearBeforeMinSupportedYear DaysInYearBeforeMinSupportedYear DaysInYearBeforeMinSupportedYear DaysInYearBeforeMinSupportedYear

MinSupportedDateTime 속성에서 지정한 연도 이전 연도의 일 수를 가져옵니다.Gets the number of days in the year that precedes the year that is specified by the MinSupportedDateTime property.

(Inherited from Calendar)
Eras Eras Eras Eras

PersianCalendar 개체에 있는 연대의 목록을 가져옵니다.Gets the list of eras in a PersianCalendar object.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Calendar 개체가 읽기 전용인지 여부를 나타내는 값을 가져옵니다.Gets a value indicating whether this Calendar object is read-only.

(Inherited from Calendar)
MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime MaxSupportedDateTime

PersianCalendar 클래스에서 지원하는 마지막 날짜와 시간을 가져옵니다.Gets the latest date and time supported by the PersianCalendar class.

MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime MinSupportedDateTime

PersianCalendar 클래스에서 지원하는 시작 날짜와 시간을 가져옵니다.Gets the earliest date and time supported by the PersianCalendar class.

TwoDigitYearMax TwoDigitYearMax TwoDigitYearMax TwoDigitYearMax

두 자릿수 연도로 표시할 수 있는 100년 범위의 마지막 연도를 가져오거나 설정합니다.Gets or sets the last year of a 100-year range that can be represented by a 2-digit year.

메서드

AddDays(DateTime, Int32) AddDays(DateTime, Int32) AddDays(DateTime, Int32) AddDays(DateTime, Int32)

지정된 DateTime에서 지정된 날짜 수만큼 경과한 DateTime을 반환합니다.Returns a DateTime that is the specified number of days away from the specified DateTime.

(Inherited from Calendar)
AddHours(DateTime, Int32) AddHours(DateTime, Int32) AddHours(DateTime, Int32) AddHours(DateTime, Int32)

지정된 DateTime에서 지정된 시간 수만큼 경과한 DateTime을 반환합니다.Returns a DateTime that is the specified number of hours away from the specified DateTime.

(Inherited from Calendar)
AddMilliseconds(DateTime, Double) AddMilliseconds(DateTime, Double) AddMilliseconds(DateTime, Double) AddMilliseconds(DateTime, Double)

지정된 DateTime에서 지정된 밀리초 수만큼 경과한 DateTime을 반환합니다.Returns a DateTime that is the specified number of milliseconds away from the specified DateTime.

(Inherited from Calendar)
AddMinutes(DateTime, Int32) AddMinutes(DateTime, Int32) AddMinutes(DateTime, Int32) AddMinutes(DateTime, Int32)

지정된 DateTime에서 지정된 분 수만큼 경과한 DateTime을 반환합니다.Returns a DateTime that is the specified number of minutes away from the specified DateTime.

(Inherited from Calendar)
AddMonths(DateTime, Int32) AddMonths(DateTime, Int32) AddMonths(DateTime, Int32) AddMonths(DateTime, Int32)

지정된 DateTime 개체에서 지정된 월 수만큼 오프셋된 DateTime 개체를 반환합니다.Returns a DateTime object that is offset the specified number of months from the specified DateTime object.

AddSeconds(DateTime, Int32) AddSeconds(DateTime, Int32) AddSeconds(DateTime, Int32) AddSeconds(DateTime, Int32)

지정된 DateTime에서 지정된 초 수만큼 경과한 DateTime을 반환합니다.Returns a DateTime that is the specified number of seconds away from the specified DateTime.

(Inherited from Calendar)
AddWeeks(DateTime, Int32) AddWeeks(DateTime, Int32) AddWeeks(DateTime, Int32) AddWeeks(DateTime, Int32)

지정된 DateTime에서 지정된 주 수만큼 경과한 DateTime을 반환합니다.Returns a DateTime that is the specified number of weeks away from the specified DateTime.

(Inherited from Calendar)
AddYears(DateTime, Int32) AddYears(DateTime, Int32) AddYears(DateTime, Int32) AddYears(DateTime, Int32)

지정된 DateTime 개체에서 지정된 연도 수만큼 오프셋된 DateTime 개체를 반환합니다.Returns a DateTime object that is offset the specified number of years from the specified DateTime object.

Clone() Clone() Clone() Clone()

현재 Calendar 개체의 복사본인 새 개체를 만듭니다.Creates a new object that is a copy of the current Calendar object.

(Inherited from Calendar)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

지정한 개체와 현재 개체가 같은지 여부를 확인합니다.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetDayOfMonth(DateTime) GetDayOfMonth(DateTime) GetDayOfMonth(DateTime) GetDayOfMonth(DateTime)

지정된 DateTime 개체의 날짜(월 기준)를 반환합니다.Returns the day of the month in the specified DateTime object.

GetDayOfWeek(DateTime) GetDayOfWeek(DateTime) GetDayOfWeek(DateTime) GetDayOfWeek(DateTime)

지정된 DateTime 개체의 요일을 반환합니다.Returns the day of the week in the specified DateTime object.

GetDayOfYear(DateTime) GetDayOfYear(DateTime) GetDayOfYear(DateTime) GetDayOfYear(DateTime)

지정된 DateTime 개체의 날짜(연도 기준)를 반환합니다.Returns the day of the year in the specified DateTime object.

GetDaysInMonth(Int32, Int32) GetDaysInMonth(Int32, Int32) GetDaysInMonth(Int32, Int32) GetDaysInMonth(Int32, Int32)

현재 연대의 지정된 연도 및 월에 있는 일 수를 반환합니다.Returns the number of days in the specified month and year of the current era.

(Inherited from Calendar)
GetDaysInMonth(Int32, Int32, Int32) GetDaysInMonth(Int32, Int32, Int32) GetDaysInMonth(Int32, Int32, Int32) GetDaysInMonth(Int32, Int32, Int32)

지정된 연도 및 연대의 지정된 월에 있는 일 수를 반환합니다.Returns the number of days in the specified month of the specified year and era.

GetDaysInYear(Int32) GetDaysInYear(Int32) GetDaysInYear(Int32) GetDaysInYear(Int32)

현재 연대의 지정된 연도에 있는 일 수를 반환합니다.Returns the number of days in the specified year of the current era.

(Inherited from Calendar)
GetDaysInYear(Int32, Int32) GetDaysInYear(Int32, Int32) GetDaysInYear(Int32, Int32) GetDaysInYear(Int32, Int32)

지정된 연대에 있는 지정된 연도의 일수를 반환합니다.Returns the number of days in the specified year of the specified era.

GetEra(DateTime) GetEra(DateTime) GetEra(DateTime) GetEra(DateTime)

지정된 DateTime 개체의 연대를 반환합니다.Returns the era in the specified DateTime object.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

기본 해시 함수로 작동합니다.Serves as the default hash function.

(Inherited from Object)
GetHour(DateTime) GetHour(DateTime) GetHour(DateTime) GetHour(DateTime)

지정된 DateTime의 시간 값을 반환합니다.Returns the hours value in the specified DateTime.

(Inherited from Calendar)
GetLeapMonth(Int32) GetLeapMonth(Int32) GetLeapMonth(Int32) GetLeapMonth(Int32)

지정된 연도의 윤월을 계산합니다.Calculates the leap month for a specified year.

(Inherited from Calendar)
GetLeapMonth(Int32, Int32) GetLeapMonth(Int32, Int32) GetLeapMonth(Int32, Int32) GetLeapMonth(Int32, Int32)

지정된 연도 및 연대의 윤월을 반환합니다.Returns the leap month for a specified year and era.

GetMilliseconds(DateTime) GetMilliseconds(DateTime) GetMilliseconds(DateTime) GetMilliseconds(DateTime)

지정된 DateTime의 밀리초 값을 반환합니다.Returns the milliseconds value in the specified DateTime.

(Inherited from Calendar)
GetMinute(DateTime) GetMinute(DateTime) GetMinute(DateTime) GetMinute(DateTime)

지정된 DateTime의 분 값을 반환합니다.Returns the minutes value in the specified DateTime.

(Inherited from Calendar)
GetMonth(DateTime) GetMonth(DateTime) GetMonth(DateTime) GetMonth(DateTime)

지정된 DateTime 개체의 월을 반환합니다.Returns the month in the specified DateTime object.

GetMonthsInYear(Int32) GetMonthsInYear(Int32) GetMonthsInYear(Int32) GetMonthsInYear(Int32)

현재 연대에 있는 지정된 연도의 월 수를 반환합니다.Returns the number of months in the specified year in the current era.

(Inherited from Calendar)
GetMonthsInYear(Int32, Int32) GetMonthsInYear(Int32, Int32) GetMonthsInYear(Int32, Int32) GetMonthsInYear(Int32, Int32)

지정된 연대에 있는 지정된 연도의 월 수를 반환합니다.Returns the number of months in the specified year of the specified era.

GetSecond(DateTime) GetSecond(DateTime) GetSecond(DateTime) GetSecond(DateTime)

지정된 DateTime의 초 값을 반환합니다.Returns the seconds value in the specified DateTime.

(Inherited from Calendar)
GetType() GetType() GetType() GetType()

현재 인스턴스의 Type을 가져옵니다.Gets the Type of the current instance.

(Inherited from Object)
GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek) GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)

지정된 DateTime 값의 날짜가 포함된 주(연도 기준)를 반환합니다.Returns the week of the year that includes the date in the specified DateTime value.

(Inherited from Calendar)
GetYear(DateTime) GetYear(DateTime) GetYear(DateTime) GetYear(DateTime)

지정된 DateTime 개체의 연도를 반환합니다.Returns the year in the specified DateTime object.

IsLeapDay(Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32)

현재 연대의 지정된 날짜가 윤일인지 여부를 확인합니다.Determines whether the specified date in the current era is a leap day.

(Inherited from Calendar)
IsLeapDay(Int32, Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32, Int32) IsLeapDay(Int32, Int32, Int32, Int32)

지정한 날짜가 윤일인지 여부를 확인합니다.Determines whether the specified date is a leap day.

IsLeapMonth(Int32, Int32) IsLeapMonth(Int32, Int32) IsLeapMonth(Int32, Int32) IsLeapMonth(Int32, Int32)

현재 연대의 지정된 연도에 있는 지정된 월이 윤월인지 여부를 확인합니다.Determines whether the specified month in the specified year in the current era is a leap month.

(Inherited from Calendar)
IsLeapMonth(Int32, Int32, Int32) IsLeapMonth(Int32, Int32, Int32) IsLeapMonth(Int32, Int32, Int32) IsLeapMonth(Int32, Int32, Int32)

지정한 연대 및 연도의 특정 월이 윤월인지 여부를 확인합니다.Determines whether the specified month in the specified year and era is a leap month.

IsLeapYear(Int32) IsLeapYear(Int32) IsLeapYear(Int32) IsLeapYear(Int32)

지정된 연대의 지정된 연도가 윤년인지 여부를 확인합니다.Determines whether the specified year in the current era is a leap year.

(Inherited from Calendar)
IsLeapYear(Int32, Int32) IsLeapYear(Int32, Int32) IsLeapYear(Int32, Int32) IsLeapYear(Int32, Int32)

지정된 연대의 지정된 연도가 윤년인지 여부를 확인합니다.Determines whether the specified year in the specified era is a leap year.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.Creates a shallow copy of the current Object.

(Inherited from Object)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

현재 연대의 지정된 날짜와 시간으로 설정된 DateTime을 반환합니다.Returns a DateTime that is set to the specified date and time in the current era.

(Inherited from Calendar)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32) ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)

지정된 날짜, 시간 및 연대로 설정된 DateTime 개체를 반환합니다.Returns a DateTime object that is set to the specified date, time, and era.

ToFourDigitYear(Int32) ToFourDigitYear(Int32) ToFourDigitYear(Int32) ToFourDigitYear(Int32)

지정된 연도를 네 자릿수 연도로 변환합니다.Converts the specified year to a four-digit year representation.

ToString() ToString() ToString() ToString()

현재 개체를 나타내는 문자열을 반환합니다.Returns a string that represents the current object.

(Inherited from Object)

적용 대상

추가 정보