Skip to content

SHDate.isLeapYear()

The isLeapYear() method returns whether the specified date is a leap year.

Try it


Syntax

isLeapYear();

Return value

If the year is a leap year, the value is correct; Otherwise, the value is incorrect.

Examples

Using isLeapYear()

var today = new SHDate();
var isLeapYear = today.isLeapYear();

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/isLeapYear