var x= new Date("2020/01/01"); x.setDate(x.getDate()+730) // add two years var p = new Date(x) // this print Fri Dec 31 2021 00:00:00 GMT+0300 (Arabian Standard Time) // which is wrong date
x.setFullYear(x.getFullYear() + 2);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)