var increase=0; function IncreaseDays() { var toTime= new Date() increase = increase + 1; toTime.setDate(toTime.getDate() + increase); if (toTime.getDay() == 0) { toTime.setDate(toTime.getDate() + 1); } else if(toTime.getDay() == 6) { toTime.setDate(toTime.getDate() + 2); } }
increase = 1
toTime = (11 + 1) = 12th December
increase = 2
toTime = (11 + 2) = 13th December
increase = 3
toTime = (11 + 3) = 14th December
increase = 4
toTime = (11 + 4) = 15th December
increase = 5
toTime = (11 + 5) = 16th December
increase
toTime
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)