PersianCalendar 类

定义

表示波斯历。

public ref class PersianCalendar : System::Globalization::Calendar
public class PersianCalendar : System.Globalization.Calendar
[System.Serializable]
public class PersianCalendar : System.Globalization.Calendar
type PersianCalendar = class
    inherit Calendar
[<System.Serializable>]
type PersianCalendar = class
    inherit Calendar
Public Class PersianCalendar
Inherits Calendar
继承
PersianCalendar
属性

示例

以下示例使用DateTime属性、DateTime.Now构造函数和波斯日历DateTime的方法实例化ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)对象。 然后,它在公历和波斯日历中显示这些日期。 它还显示波斯日历的日期范围。

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 字段、属性和方法成员。

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

注解

波斯语日历用于大多数说波斯语的国家/地区,尽管某些区域使用不同的月份名称。 波斯历是伊朗和阿富汗的官方日历,它是哈萨克斯坦和塔吉克斯坦等地区的替代日历之一。

注释

有关在 .NET 中使用 PersianCalendar 类和其他日历类的信息,请参阅 使用日历

波斯历是一个太阳的希里历法,从希克拉的年开始,它对应于622 C.E.,这是穆罕默德从麦加迁移到麦地那的一年。

波斯历以太阳年为基础,长约365天。 一年经历四个季节。当太阳从地球中心观测穿过赤道,从南半球到达北半球时,新的一年开始。 新年标志着法瓦尔丁月的第一天,这是北半球春天的第一天。 例如,2002 年 3 月 21 日的日期对应于 1381 年 Anno Persico 中 Farvardeen 月份的第一天。

波斯历的前六个月中,每一个月都有31天,未来5个月都有30天,上个月在普通年份有29天,一跃年有30天。 闰年是指在一种算法中,一年除以33后,余数为1、5、9、13、17、22、26或30。 例如,1370 年是一个跃升年,因为将其除以 33,余数为 17。 每33年周期中大约有8个闰年。

Hijri 太阳天文算法

PersianCalendar 类使用 Hijri 太阳天文算法而不是观测算法来计算日期。 PersianCalendar这使得实施与在伊朗和阿富汗使用的波斯历保持一致,这是波斯历最普遍使用的两个国家。

使用 PersianCalendar 类

可以使用PersianCalendar对象计算波斯历中的日期,或将波斯日期转换为公历日期,也可以从公历日期转换为波斯日期。 波斯历是波斯语(阿富汗)和库尔德中部(伊朗)等文化 的默认日历

构造函数

名称 说明
PersianCalendar()

初始化 PersianCalendar 类的新实例。

字段

名称 说明
CurrentEra

表示当前日历的当前纪元。 此字段的值为 0。

(继承自 Calendar)
PersianEra

表示当前时代。 此字段为常量。

属性

名称 说明
AlgorithmType

获取一个值,该值指示当前日历是基于太阳的、基于月球的还是基于月亮的。

DaysInYearBeforeMinSupportedYear

获取属性指定的 MinSupportedDateTime 年份之前的年份中的天数。

(继承自 Calendar)
Eras

获取对象中的 PersianCalendar 纪元列表。

IsReadOnly

获取一个值,该值指示此 Calendar 对象是否为只读。

(继承自 Calendar)
MaxSupportedDateTime

获取类支持 PersianCalendar 的最新日期和时间。

MinSupportedDateTime

获取类支持的 PersianCalendar 最早日期和时间。

TwoDigitYearMax

获取或设置一个 100 年范围的上一年,该范围可以由 2 位年份表示。

方法

名称 说明
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, Int32)

返回指定年份和纪元的指定月份中的天数。

GetDaysInMonth(Int32, Int32)

返回当前纪元的指定月份和年份中的天数。

(继承自 Calendar)
GetDaysInYear(Int32, Int32)

返回指定纪元指定年份中的天数。

GetDaysInYear(Int32)

返回当前纪元指定年份中的天数。

(继承自 Calendar)
GetEra(DateTime)

返回指定 DateTime 对象中的纪元。

GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetHour(DateTime)

返回指定 DateTime中的小时值。

(继承自 Calendar)
GetLeapMonth(Int32, Int32)

返回指定年份和纪元的跃月。

GetLeapMonth(Int32)

计算指定年份的跃点月。

(继承自 Calendar)
GetMilliseconds(DateTime)

返回指定 DateTime中的毫秒值。

(继承自 Calendar)
GetMinute(DateTime)

返回指定 DateTime中的分钟值。

(继承自 Calendar)
GetMonth(DateTime)

返回指定 DateTime 对象中的月份。

GetMonthsInYear(Int32, Int32)

返回指定纪元指定年份中的月数。

GetMonthsInYear(Int32)

返回当前纪元中指定年份的月份数。

(继承自 Calendar)
GetSecond(DateTime)

返回指定 DateTime中的秒值。

(继承自 Calendar)
GetType()

获取当前实例的 Type

(继承自 Object)
GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)

返回包含指定 DateTime 值中的日期的年份的周。

(继承自 Calendar)
GetYear(DateTime)

返回指定 DateTime 对象中的年份。

IsLeapDay(Int32, Int32, Int32, Int32)

确定指定的日期是否为 leap 日。

IsLeapDay(Int32, Int32, Int32)

确定当前纪元中的指定日期是否为跃点。

(继承自 Calendar)
IsLeapMonth(Int32, Int32, Int32)

确定指定年份和纪元中的指定月份是否为跃月。

IsLeapMonth(Int32, Int32)

确定当前纪元中指定年份中的指定月份是否为跃月。

(继承自 Calendar)
IsLeapYear(Int32, Int32)

确定指定纪元中的指定年份是否为跃年。

IsLeapYear(Int32)

确定当前时代的指定年份是否为跃年。

(继承自 Calendar)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)

返回一个 DateTime 对象,该对象设置为指定的日期、时间和纪元。

ToDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

返回一个 DateTime 设置为当前纪元中的指定日期和时间。

(继承自 Calendar)
ToFourDigitYear(Int32)

将指定的年份转换为四位数的年份表示形式。

ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅