is-valid-month

1.0.0 • Public • Published

is-valid-month Build Status

Check if a number is a valid month

Install

$ npm install --save is-valid-month

Usage

var isValidMonth = require('is-valid-month');
 
isValidMonth(1) // true
isValidMonth('1') // false

API

isValidMonth(month) -> boolean

month

Required
Type: number

The month is only valid if it is an integer between 1 and 12. Any other values are invalid, including strings and floats.

License

MIT © Ben Drucker

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    20,927
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    20,927

Package Sidebar

Install

npm i is-valid-month

Weekly Downloads

16,023

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bendrucker