prev-day
v1.0.1
Published
Get the previous occurance of a day of the week, eg: last Thursday
Downloads
25
Readme
prev-day
Get the previous occurance of a day of the week, eg: last Thursday
Installation
npm install --save prev-day
Usage
var prevDay = require('prev-day');
// get previous Monday
prevDay(new Date(), 1); // returns { date: [Date] , daySince: 4 }
^ date object ^ day since prev Monday
// or equivalent to
prevDay(new Date(), prevDay.Monday);