I need to calculate a JS date given year=2014 and month=9 (September 2014).
I tried this:
var moment = require(\'moment\'); var startDate = moment( y
you can use this directly for the end or start date of the month
new moment().startOf('month').format("YYYY-DD-MM"); new moment().endOf("month").format("YYYY-DD-MM");
you can change the format by defining a new format