Get current week number of the current year,given Date format string or Date object.
Install
npm i --save current-week-number
npm test
current-week-number --help
API
For more use-cases see the tests
currentWeekNumber
Get week number of the current date/year or given valid
Date
string format
[date]
{String} every valid Date-ish string formatreturn
{Number}
Example:
var currentWeekNumber = ; // june 27, 2014;//=> 26 ;//=> 13 ;//=> 13 ;//=> 12, cuz' year is leap ;//=> 32 ;//=> 31 ;//=> 8 ;//=> 37 ;//=> 7
CLI
You can just run
current-week-number --help
for more information
Author
Charlike Mike Reagent
License
Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
Released under the MIT
license.
Powered and automated by kdf, March 02, 2015