# spacetime-week-math

> calculate nth week of the month

Latest version **0.0.1** (published 2020-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install spacetime-week-math
pnpm add spacetime-week-math
yarn add spacetime-week-math
bun add spacetime-week-math
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-11-26 |
| First published | 2020-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4107 |
| Maintainers | spencermountain |

## Links

- npm: https://www.npmjs.com/package/spacetime-week-math
- Repository: https://github.com/spencermountain/spacetime
- Homepage: https://github.com/spencermountain/spacetime#readme
- Issues: https://github.com/spencermountain/spacetime/issues
- npm.io page: https://npm.io/package/spacetime-week-math

## Recent versions

- 0.0.1 (latest) — 2020-11-26

## README

<div align="center">

  <div>calculate the nth day of a month</div>
  <div><img src="https://cloud.githubusercontent.com/assets/399657/23590290/ede73772-01aa-11e7-8915-181ef21027bc.png" /></div>

  <div align="center">
    <a href="https://npmjs.org/package/spacetime-week-math">
      <img src="https://img.shields.io/npm/v/spacetime-week-math.svg?style=flat-square" />
    </a>
    <!-- <a href="https://codecov.io/gh/spencermountain/spacetime-week-math">
      <img src="https://codecov.io/gh/spencermountain/spacetime-week-math/branch/master/graph/badge.svg" />
    </a> -->
    <a href="https://unpkg.com/spacetime-week-math/builds/spacetime-week-math.min.js">
      <img src="https://badge-size.herokuapp.com/spencermountain/spacetime-week-math/master/builds/spacetime-week-math.min.js" />
    </a>
  </div>
  <div align="center">
    <code>spacetime-week-math</code>
  </div>
  <sub>
    by
    <a href="https://spencermountain.github.io/">Spencer Kelly</a>
  </sub>
</div>
<p></p>


a spacetime plugin to calculate the nth day of a month.

like `.week()` which is based on the year, `.monthWeek()` works as a getter+setter, based on the input param:
```js

// Oct 2020 starts on a thursday
let s = spacetime('saturday oct 10th 2020')
s.monthWeek()
// 2

s = s.monthWeek(1)
// Mon Sep 28th

```
the week numbers start at 1.

**Note:** 
the getter/setter can produce different results:
```js
let s = spacetime('saturday oct 10th 2020')
s = s.monthWeek(1)
// Mon Sep 28th
s.monthWeek()
// 5
```
Sep 28th is considered the 5th week of September.


work-in-progress.

MIT

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