Get the number of weeks in year - leap or not.
npm i --save year-weeks
npm test
For more use-cases see the tests
Get the number of weeks in year - leap or not.
[val]
{Date|Number} every valid Date format string, Date object or year as numberreturn
{Number}
Example:
var yearWeeks = require('year-weeks');
yearWeeks(2014);
//=> 52
yearWeeks(2016);
//=> 52
yearWeeks(new Date(2016, 0));
//=> 52
yearWeeks('2012-12-17T03:24:00');
//=> 52
Charlike Mike Reagent
Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
Released under the MIT
license.
Powered and automated by kdf, March 02, 2015