Answers for "javascript get days since date"

5

javascript subtract days from date

var myCurrentDate=new Date();
var myPastDate=new Date(myCurrentDate);
    myPastDate.setDate(myPastDate.getDate() - 8);//myPastDate is now 8 days in the past
Posted by: Guest on August-01-2019
0

new date() in javascript 3 days from now

var dt = new Date();
dt.setDate(dt.getDate() + 3);
Posted by: Guest on July-08-2020

Code answers related to "javascript get days since date"

Code answers related to "Javascript"

Browse Popular Code Answers by Language