The Date.isLeapYear() function 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)); // output is: false |