# getmonths

> It will return months as per given format between two dates

Latest version **1.0.9** (published 2020-02-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install getmonths
pnpm add getmonths
yarn add getmonths
bun add getmonths
```

## 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.9 |
| Published | 2020-02-19 |
| First published | 2020-02-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Abhishek Kumar |
| Maintainers | abhishek2kr |
| Keywords | month |

## Links

- npm: https://www.npmjs.com/package/getmonths
- npm.io page: https://npm.io/package/getmonths

## Recent versions

- 1.0.9 (latest) — 2020-02-19
- 1.0.8 — 2020-02-19
- 1.0.7 — 2020-02-19
- 1.0.6 — 2020-02-19
- 1.0.5 — 2020-02-19
- 1.0.4 — 2020-02-19
- 1.0.3 — 2020-02-19
- 1.0.2 — 2020-02-19
- 1.0.0 — 2020-02-19

## README

#### Using this package you can get all the months between two dates.

**Example** 

  **startYear** in YYYY format like 2018

  **endYear** in YYYY format like 2018

  **startMonth** in M format like 5

  **endMonth** in M format like 8 

  **monthArray** like ["01","02","03","04","05","06","07","08","09","10","11","12"] **or**
                  ["1","2","3","4","5","6","7","8","9","10","11","12"] **or**
                  ["JAN","FEB"...] **or**
                  ["January"...] **or**
                  ["Jan"...]

  **Output will be :** [05-2018, 06-2018, 07-2018, 08-2018] for first monthArray.

  **How to use in your code**

  ```javascript
    { 
        try {
            const startYear = 2018;
            const endYear = 2018;
            const startMonth = 2;
            const endMonth = 9;
            const monthArray = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
            console.log(test.getMonths(startYear, endYear, startMonth, endMonth, monthArray));
        } catch (error) {
            console.log(error);
        }
    }
  ```



**abhishek2kr** :cowboy_hat_face:

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