javascript date 3 months ago

43

javascript date 3 months ago -

var d = new Date();
d.setMonth(d.getMonth() - 3);

javascript date 3 months ago -

var someDate = new Date(); // add arguments as needed
someDate.setTime(someDate.getTime() - 3*28*24*60*60);
// assumes the definition of "one month" to be "four weeks".

js months ago -

var d = new Date();
d.setMonth(d.getMonth() - 3);

Comments

Submit
0 Comments