Skip to content

Get the number of days in a month

License

Notifications You must be signed in to change notification settings

datetime/month-days

Repository files navigation

month-days Build Status

Get the number of days in a month

Install

$ npm install --save month-days

Usage

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

About

Get the number of days in a month

Resources

License

Stars

Watchers

Forks

Packages

No packages published