Calendar.GetLeapMonth 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
计算指定年份或指定纪元年份的闰月。
重载
GetLeapMonth(Int32, Int32) |
计算指定纪元年份的闰月。 |
GetLeapMonth(Int32) |
计算指定年份的闰月。 |
GetLeapMonth(Int32, Int32)
计算指定纪元年份的闰月。
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
纪元。
返回
一个正整数,用于表示指定纪元年份中的闰月。
- 或 -
如果此日历不支持闰月,或者
year
和era
参数未指定闰年,则为零。
- 属性
注解
在支持跨月概念的日历中,可以在特定月份之后或在一年内的任何月份之后发生跃点月。 例如,该方法 GetMonth(DateTime) 返回一个介于 1 和 13 之间的数字,该值指示与指定日期关联的月份。 如果当年第八个月和第九个月之间有一个跃点月,则 GetMonth(DateTime) 该方法返回 8,第八个月返回 9 个,第九个月返回 10 个。
适用于
GetLeapMonth(Int32)
计算指定年份的闰月。
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 个。