/is-leap-year

Returns `true` if the year is a leap year.

Primary LanguageJavaScriptMIT LicenseMIT

is-a-leap-year NPM version

Returns true if the year is a leap year.

Install

Install with npm:

$ npm install --save is-a-leap-year

Usage

const isLeapYear = require('is-a-leap-year');

console.log(isLeapYear(2004));  // true
console.log(isLeapYear('2004'));  // true
console.log(isLeapYear(new Date('2004-01-01')));  // true