An open API service indexing awesome lists of open source software.

https://github.com/datetime/month-days

Get the number of days in a month
https://github.com/datetime/month-days

Last synced: 3 months ago
JSON representation

Get the number of days in a month

Awesome Lists containing this project

README

          

# month-days [![Build Status](https://travis-ci.org/datetime/month-days.svg?branch=master)](https://travis-ci.org/datetime/month-days)

> Get the number of days in a month

## Install

```
$ npm install --save month-days
```

## Usage

```js
var monthDays = require('month-days');

monthDays(1, 2016);
//=> 29
```

## API

### monthDays([month], [year])

#### month

Type: `number`
Default: current UTC month

Note that month is zero-index to be consistent with the native date methods.

#### year

Type: `number`
Default: current UTC year

## License

MIT © [Sindre Sorhus](http://sindresorhus.com)