I use the following code to get startDate and endDate of the last months.
// Previous month
var startDateMonthMinusOne = moment().subtract(1, "month").startOf("month").unix();
var endDateMonthMinusOne = moment().subtract(1, "month").endOf("month").unix();
// Previous month - 1
var startDateMonthMinusOne = moment().subtract(2, "month").startOf("month").unix();
var endDateMonthMinusOne = moment().subtract(2, "month").endOf("month").unix();
How can i do to get also the month name ? (January, February, ...)
question from:https://stackoverflow.com/questions/42245587/get-month-name-of-last-month-using-moment