month-days
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

month-days

Get the number of days in a month

Install

npm install month-days

Usage

import monthDays from '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

Package Sidebar

Install

npm i month-days

Weekly Downloads

102

Version

4.0.0

License

MIT

Unpacked Size

3.35 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus