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
屬性

範例

以下範例透過屬性DateTimeDateTime.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

備註

波斯歷用於大多數說波斯語的國家/地區,雖然某些地區使用不同的月份名稱。 波斯曆是伊朗和阿富汗的官方日曆,它是哈薩克和塔吉克等地區的替代日曆之一。

Note

如需在 .NET 中使用 PersianCalendar 類別和其他行事曆類別的相關信息,請參閱 使用行事曆

波斯曆是一個太陽伊斯蘭曆,從伊斯蘭曆開始,對應於公元622年,也就是穆罕默德從麥加遷徙到麥地那的年份。

波斯歷以太陽年為基礎,長約365天。 一年迴圈四個季節,新的一年開始,太陽似乎從南半球穿過赤道到北半球,從地球中心看。 新年是法瓦爾丁月的第一天,這是北半球春天的第一天。 例如,2002 年 3 月 21 日 C.E. 的日期會對應到 1381 年 Anno Persico 中 Farvardeen 月份的第一天。

波斯歷前六個月各有 31 天,接下來五個月各有 30 天,上個月在一個普通年份有 29 天,一個閏年有 30 天。 閏年是一年,當除以 33 時,其餘為 1、5、9、13、17、22、26 或 30。 例如,1370 年是閏年,因為除以 33 會產生 17 的餘數。 每 33 年週期大約有 8 個閏年。

伊斯蘭曆太陽天文演算法

PersianCalendar 課程使用伊斯蘭曆太陽天文演算法,而非觀測演算法來計算日期。 這使得 PersianCalendar 的運作方式與在伊朗和阿富汗廣泛使用的波斯歷保持一致,這兩個國家是波斯歷使用最廣泛的地方。

使用波斯文Calendar 類別

您可以使用 PersianCalendar 物件來計算波斯曆中的日期,或將波斯日期轉換成公曆日期與公曆日期。 波斯曆是波斯文(阿富汗)和伊朗中部等文化 的預設日曆

建構函式

名稱 Description
PersianCalendar()

初始化 PersianCalendar 類別的新執行個體。

欄位

名稱 Description
CurrentEra

代表當前曆法的時代。 此欄位的值為 0。

(繼承來源 Calendar)
PersianEra

代表當代時代。 此欄位是常數。

屬性

名稱 Description
AlgorithmType

會有一個值,表示當前曆法是太陽曆、月曆還是單日曆。

DaysInYearBeforeMinSupportedYear

取得該房產指定 MinSupportedDateTime 年份之前的年份天數。

(繼承來源 Calendar)
Eras

取得物件 PersianCalendar 的時代列表。

IsReadOnly

取得一個值,表示該 Calendar 物件是否為唯讀。

(繼承來源 Calendar)
MaxSupportedDateTime

獲得班級支持 PersianCalendar 的最新日期和時間。

MinSupportedDateTime

獲得班上最早支持 PersianCalendar 的日期和時間。

TwoDigitYearMax

取得或設定一個百年範圍的最後一年,該範圍可用兩位數年份表示。

方法

名稱 Description
AddDays(DateTime, Int32)

回傳 a DateTime 即距離指定 DateTime天數的距離。

(繼承來源 Calendar)
AddHours(DateTime, Int32)

回傳 a DateTime 為距離指定 的 ,即距離指定 DateTime的時數。

(繼承來源 Calendar)
AddMilliseconds(DateTime, Double)

回傳 a DateTime 是與指定 DateTime相距的 m秒數。

(繼承來源 Calendar)
AddMinutes(DateTime, Int32)

回傳 a DateTime 為距離指定 DateTime分鐘數的 。

(繼承來源 Calendar)
AddMonths(DateTime, Int32)

回傳 DateTime 一個物件,該物件與指定 DateTime 物件相差了指定月數。

AddSeconds(DateTime, Int32)

回傳 a DateTime 與指定 DateTime秒數相距。

(繼承來源 Calendar)
AddWeeks(DateTime, Int32)

回傳 a 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)

判斷指定日期是否為閏日。

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)

回傳設定為當前時代指定日期與時間的 a DateTime

(繼承來源 Calendar)
ToFourDigitYear(Int32)

將指定的年份轉換為四位數的年份表示。

ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

適用於

另請參閱