dates-in-month
v1.1.2
Published
A nodejs package to get dates in a month in ISO format
Downloads
7
Maintainers
Readme
dates-in-month
A nodejs package to get dates in a month in ISO format.
Install
npm install --save dates-in-month
Usage
- getDatesInMonth()
This method accepts object of month and year and return array of dates in the month.
ES6
import {getDatesInMonth} from 'dates-in-month'
ES5
var {getDatesInMonth} = require('dates-in-month');
Usage of getDatesInMonth
console.log(getDatesInMonth({month:01,year:1943})); //Output: ['01-01-1943', '02-01-1943', '03-01-1943', ......, '31-01-1943']
console.log(getDatesInMonth({month:01,year:1943,format:1})); //Output: ['01-01-1943', '02-01-1943', '03-01-1943', ......, '31-01-1943']
console.log(getDatesInMonth({month:01,year:1943,format:-1})); //Output: ['1943-01-01', '1943-01-02', '1943-01-03', ......, '1943-01-31']
License
MIT © David G. Aladeusi