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

備註

如需此 API 的詳細資訊,請參閱 補充適用於卡endar 的 API 備註

建構函式

PersianCalendar()

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

欄位

CurrentEra

表示目前曆法的目前紀元。 此欄位的值為 0。

(繼承來源 Calendar)
PersianEra

代表目前的紀元。 這個欄位為常數。

屬性

AlgorithmType

取得值,表示目前的曆法是以陽曆為主、以陰曆為主,或以陰陽曆為主。

AlgorithmType

取得值,指出目前的月曆是以陽曆為主、以陰曆為主,還是同時包含兩種曆法。

(繼承來源 Calendar)
DaysInYearBeforeMinSupportedYear

取得 MinSupportedDateTime 屬性指定之年的前一年的天數。

(繼承來源 Calendar)
Eras

取得 PersianCalendar 物件中的紀元清單。

IsReadOnly

取得值,指出 Calendar 物件是否為唯讀。

(繼承來源 Calendar)
MaxSupportedDateTime

取得 PersianCalendar 類別所支援的最晚日期和時間。

MinSupportedDateTime

取得 PersianCalendar 類別所支援的最早日期和時間。

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)

傳回指定之年份和紀元的閏月。

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)

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

ToString()

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

(繼承來源 Object)

適用於

另請參閱