How to increment a date by 7 days in TypeScript

1 Answer

0 votes
const date = new Date();
 
date.setDate(date.getDate() + 7);
 
console.log(date.toDateString());
 
   
   
   
/*
run:
   
"Sat Mar 12 2022" 
   
*/

 



answered Mar 5, 2022 by avibootz
...