input value
boolean whether a value corresponds to a leap year
var bool = isLeapYear();
// returns <boolean>
var bool = isLeapYear( new Date() );
// returns <boolean>
var bool = isLeapYear( 1996 );
// returns true
var bool = isLeapYear( 2001 );
// returns false
Tests whether a value corresponds to a leap year in the Gregorian calendar.
Notes
4
is a leap year, except those years which are also divisible by100
and not by400
(e.g.,1900
).