# prev-day

> Get the previous occurance of a day of the week, eg: last Thursday

Latest version **1.0.1** (published 2017-04-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install prev-day
pnpm add prev-day
yarn add prev-day
bun add prev-day
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-04-01 |
| First published | 2017-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | cedmax |
| Maintainers | cedmax |
| Keywords | day, nodejs, javascript, date, util |

## Links

- npm: https://www.npmjs.com/package/prev-day
- Repository: https://github.com/cedmax/prev-day
- Homepage: https://github.com/cedmax/prev-day#readme
- Issues: https://github.com/cedmax/prev-day/issues
- npm.io page: https://npm.io/package/prev-day

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-04-01
- 1.0.0 — 2017-04-01

## README

# prev-day
[![Build Status](https://travis-ci.org/cedmax/prev-day.svg?branch=master)](https://travis-ci.org/cedmax/prev-day)
<!--[![npm version](https://badge.fury.io/js/prev-day.svg)](https://badge.fury.io/js/prev-day)
[![Dependency status](https://david-dm.org/tanhauhau/prev-day.svg)](https://david-dm.org)
[![Downloads](https://img.shields.io/npm/dt/prev-day.svg)](https://www.npmjs.com/package/prev-day)
[![Donate](https://img.shields.io/gratipay/user/tanhauhau.svg)](https://gratipay.com/~tanhauhau/)
[![codecov](https://codecov.io/gh/tanhauhau/prev-day/branch/master/graph/badge.svg)](https://codecov.io/gh/tanhauhau/prev-day)-->


> Get the previous occurance of a day of the week, eg: last Thursday

## Installation

```bash
npm install --save prev-day
```

## Usage

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

---
_Source: https://npm.io/package/prev-day · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
