npm.io
1.0.6 • Published 3 years ago

getmonthlist

Licence
ISC
Version
1.0.6
Deps
0
Size
17 kB
Vulns
0
Weekly
0

getMonthList

Input the month and year, Output the data for the current month

Usage

import getMonthList from 'getmonthlist'

// November 2019
getMonthList(2019, 10) // [{year: 2019, month: 10, day: 1, week: 5}, ..., {year: 2019, month: 10, day: 30, week: 6}]

// June 2017
getMonthList(2017, 7) // [{year: 2017, month: 7, day: 1, week: 6}, ..., {year: 2017, month: 7, day: 31, week: 1}]

// default is current time
getMonthList() // [{year: 2019, month: 10, day: 1, week: 5}, ..., {year: 2019, month: 10, day: 30, week: 6}]

Keywords