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
- Host: GitHub
- URL: https://github.com/datetime/month-days
- Owner: datetime
- License: mit
- Created: 2014-06-26T21:09:54.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-05-24T16:38:31.000Z (about 9 years ago)
- Last Synced: 2025-03-06T10:25:09.719Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# month-days [](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)