Answers for "javascript date 3 months ago"

2

javascript date 3 months ago

var d = new Date();
d.setMonth(d.getMonth() - 3);
Posted by: Guest on May-04-2020
0

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".
Posted by: Guest on May-04-2020

Code answers related to "javascript date 3 months ago"

Code answers related to "Javascript"

Browse Popular Code Answers by Language