prev-day

1.0.1 • Public • Published

prev-day

Build Status

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);

/prev-day/

    Package Sidebar

    Install

    npm i prev-day

    Weekly Downloads

    5

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • cedmax