Answers for "how to minus seven days from now in js"

0

javascript today minus 1 day

var d = new Date();
 d.setDate(d.getDate()-1);
Posted by: Guest on March-01-2021
0

subtract 18 years from today javascript

eighteenYearsAgo = new Date();
eighteenYearsAgo = eighteenYearsAgo.setFullYear(eighteenYearsAgo.getFullYear()-18);
console.log(eighteenYearsAgo);
Posted by: Guest on February-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language