I have the next in js, in order to file the date before 29 days:
var d = new Date();
d.setDate(d.getDate() - 29);
console.log(d);
and it return:
Sat Nov 22 2014 07:32:22 GMT-0500 (EST)
I want that it will return the following:
11-22-14
there is any way to do it?