Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


The Date.isLeapYear() function returns a boolean depending API determines if the specified year in the date is a leap year or not.

Parameters

  1. 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
languagejavascript
console.log(Date.isLeapYear(2017));  // outputs false