Get unique and sequential current week identifier for given valid
Date
string format or Date object. Week #1 is starting on January 05, 1970.
Install
npm i --save week-identifier
npm test
week-identifier --help
API
For more use-cases see the tests
weekIdentifier
Get unique and sequential current week identifier for given valid
Date
string format
[date]
{String} every valid Date-ish string formatreturn
{Number}
Example:
var weekIdentifier = ; // august 12, 2016;//=> 2432 ;//=> 1 ;//=> 2 ;//=> 2432 ;//=> 2432 ;//=> 2432 ;//=> 2433
weekIdentifier.dateFromWeek
Get monday date of the given week identifier or January 5, 1970 00:00:00 if weekIdentifier is <= 1.
[number]
{String} every valid number > 0return
{Date}
Example:
var weekIdentifier = ; weekIdentifier;//=> August 15, 2016 00:00:00 weekIdentifier;//=> January 05, 1970 00:00:00
CLI
You can just run
week-identifier --help
for more information
License
Copyright (c) 2016 [Clément Billiot], contributors.
Released under the MIT
license.