Namespace: Date

Date

Methods


<static> getDaysInMonth( [date])

传入date对象,返回当月天数

Parameters:
Name Type Argument Description
date date <optional>

指定date对象,默认为new Date()

Returns:

当月天数

Type
number

<static> isLeapYear( [year])

传入year(number),判断是否为闰年

Parameters:
Name Type Argument Description
year number <optional>

若不传year,默认为当前年份

Returns:

是否为闰年

Type
boolean

<static> now()

返回当前时间时间戳

Returns:

当前时间戳

Type
number