is-valid-month
Check if a number is a valid month
Last updated 6 years ago by bendrucker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install is-valid-month 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

1 Versions

  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 1
This Week 3
This Month 3
Last Day 0
Last Week 0
Last Month 3
Dependencies (1)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |