Calendar.GetLeapMonth 方法

定義

計算指定年份,或年份和紀元的閏月。

多載

GetLeapMonth(Int32, Int32)

計算指定年份和紀元的閏月。

GetLeapMonth(Int32)

計算指定年份的閏月。

GetLeapMonth(Int32, Int32)

來源:
Calendar.cs
來源:
Calendar.cs
來源:
Calendar.cs

計算指定年份和紀元的閏月。

public:
 virtual int GetLeapMonth(int year, int era);
public virtual int GetLeapMonth (int year, int era);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual int GetLeapMonth (int year, int era);
abstract member GetLeapMonth : int * int -> int
override this.GetLeapMonth : int * int -> int
[<System.Runtime.InteropServices.ComVisible(false)>]
abstract member GetLeapMonth : int * int -> int
override this.GetLeapMonth : int * int -> int
Public Overridable Function GetLeapMonth (year As Integer, era As Integer) As Integer

參數

year
Int32

一年。

era
Int32

一紀元。

傳回

正整數,指出在指定的年份及紀元中的閏月。

-或-

如果這個曆法不支援閏月,或 yearera 參數未指定閏年,則為零。

屬性

備註

在支援閏月概念的行事曆中,閏月可以在特定月份之後或一年中的任何月份之後發生。 例如, GetMonth(DateTime) 方法會傳回介於 1 到 13 之間的數位,指出與指定日期相關聯的月份。 如果年份第八個月和第九個月之間有閏月, GetMonth(DateTime) 則方法會傳回 8 代表第八個月,9 表示閏第八個月,而第九個月則傳回 10。

適用於

GetLeapMonth(Int32)

來源:
Calendar.cs
來源:
Calendar.cs
來源:
Calendar.cs

計算指定年份的閏月。

public:
 virtual int GetLeapMonth(int year);
public virtual int GetLeapMonth (int year);
[System.Runtime.InteropServices.ComVisible(false)]
public virtual int GetLeapMonth (int year);
abstract member GetLeapMonth : int -> int
override this.GetLeapMonth : int -> int
[<System.Runtime.InteropServices.ComVisible(false)>]
abstract member GetLeapMonth : int -> int
override this.GetLeapMonth : int -> int
Public Overridable Function GetLeapMonth (year As Integer) As Integer

參數

year
Int32

一年。

傳回

正整數,指出在指定的年份中的閏月。

-或-

如果這個曆法不支援閏月,或 year 參數不代表閏年,則為零。

屬性

備註

在支援閏月概念的行事曆中,閏月可以在特定月份之後或一年中的任何月份之後發生。 例如, GetMonth(DateTime) 方法會傳回介於 1 到 13 之間的數位,指出與指定日期相關聯的月份。 如果年份第八個月和第九個月之間有閏月, GetMonth(DateTime) 則方法會傳回 8 代表第八個月,9 表示閏第八個月,而第九個月則傳回 10。

適用於