last-leap-year
v1.1.1
Published
Get the last leap year since a specific date
Downloads
16
Maintainers
Readme
last-leap-year
Get the last leap year since a specific date
Install
$ npm install --save last-leap-year
Usage
var lastLeapYear = require('last-leap-year');
lastLeapYear();
//=> 2012
lastLeapYear(2010);
//=> 2008
lastLeapYear(new Date('January 1, 2007'));
//=> 2004
API
lastLeapYear([year])
year
Type: number
Default: Current year
lastLeapYear([date])
date
Type: instance of Date
Default: new Date()
CLI
$ npm install --global last-leap-year
$ last-leap-year --help
Usage
$ last-leap-year [input]
Examples
$ last-leap-year
2012
$ last-leap-year 2010
2008
License
MIT © Arthur Verschaeve