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, ...)