I currently have a estimated date script i run to give users of my site a estimated delivery date for a product. This all works fine and looks this in the body:
//create the date
var myDate = new Date();
//add a day to the date
myDate.setDate(myDate.getDate() + 6);
document.write(myDate.format('D jS, M'));
However i need the code to exclude weekends, as it is not possible to deliver on a weekend, how would i go about changing the script so that it adds 2 or 1 days to a weekend so that the next delivery day is a monday for example.