What we need:
example Customer start date is 11th March 2019 - 28 working days equals to 18th April , the 18th April becomes the month 1 end date, Month 2 start date is 18th April (month 1 end date + 1) which is equal to 19th April, then month 2 end date is +28 working days ... so forth for the next 12 months we need the end and start dates.
Can we also have it so its just the dates displayed and not (time and greenwhich) at the end of the date
I have so far a simple js 28-working day script that works ... but I don't know how to do the complex bit, I tried grabbing the element with html and re doing the script but it didn't work as planned.
May someone help with this struggule. Many thanks.
var startDate = "2019-03-11";
startDate = new Date(startDate.replace(/-/g, "/"));
var endDate = "", noOfDaysToAdd = 28, count = 0;
while(count < noOfDaysToAdd){
endDate = new Date(startDate.setDate(startDate.getDate() + 1));
if(endDate.getDay() != 0 && endDate.getDay() != 6){
count++;
}
}
document.getElementById("month1end").value = endDate;