How to increment a date by 1 month in TypeScript

1 Answer

0 votes
const date = new Date();

date.setMonth(date.getMonth() + 1);

console.log(date.toDateString()); 


  
  
  
  
/*
run:
  
"Wed Apr 06 2022" 
  
*/

 



answered Mar 6, 2022 by avibootz
...