If i have a variable that returns a date, in the format of dd MMM yyyy, so 28 Aug 2014, how can i get the date of the previous month.
I can modify the month via:
You could use moment.js subtract function for this.
var day = moment("2014-08-28"); day.subtract(1, 'months');