The Date.isLeapYear() method returns a boolean depending API determines if the specified year in the date is a leap year or not.
Parameters
- Year
Return Value
True if it is a leap year else falseBoolean value of true if leap year; otherwise a Boolean value of false is returned.
Example
Code Block | ||
---|---|---|
| ||
console.log(Date.isLeapYear(2017)); // outputs false |