fuzzy-date

1.0.0 • Public • Published

fuzzy-date

Like a Date but fuzzy

Returns a Date object +/- the offset milliseconds passed in

Usage

 
var FuzzyDate = require('fuzzy-date')(86400 * 1000); // offset 1 day
 
console.log(new FuzzyDate(2015, 12, 18)); // will either be 17th or 19th of December 2015
 

Multiple Offsets

 
var FuzzyDateFunction = require('fuzzy-date'),
    FuzzyDate1 = FuzzyDateFunction(86400 * 1000), // offset 1 day
    FuzzyDate2 = FuzzyDateFunction(86400 * 2000); // offset 2 days
 
console.log(new FuzzyDate1(2015, 12, 18)); // will either be 17th or 19th of December 2015
console.log(new FuzzyDate2(2015, 12, 18)); // will either be 16th or 20th of December 2015
 

Readme

Keywords

none

Package Sidebar

Install

npm i fuzzy-date

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • mauricebutler