I want to get the first and last date of a month:
let month = moment().month(2)
console.log(month, month.startOf('month'), month.endOf('month'))
They all print the same date: Sat Mar 31 2018 23:59:59 GMT+0200 (W. Europe Daylight Time)
I want to get the first and last date of a month:
let month = moment().month(2)
console.log(month, month.startOf('month'), month.endOf('month'))
They all print the same date: Sat Mar 31 2018 23:59:59 GMT+0200 (W. Europe Daylight Time)