Skip to content

mick352/month-days

 
 

Repository files navigation

month-days Build Status

Get the number of days in a month

Install

$ npm install month-days

Usage

const monthDays = require('month-days');

monthDays({month: 1, year: 2016});
//=> 29

API

monthDays([options])

options

Type: object

month

Type: number
Default: Current UTC month

Note that the 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

Languages

  • JavaScript 81.1%
  • TypeScript 18.9%