Я хочу добавить дату в html в shopify описание продукта
Что бы он сказал
Мы отправим товар с сегодняшнего дня + 11 дней .....
И если он выпадает на субботу или воскресенье, он будет перенесен на понедельник, потому что мы закрыты в субботу или воскресенье.
Код пока такой, но не знаю, как переместить его в первый понедельник, если необходимо
// get the destination within the DOM
var wrapper = document.getElementById('productEta'),
// get today as a js Date object
today = new Date(),
// get the Unix of today (miliseconds) and add desired time (3 weeks)
etaUnix = today.getTime() + (60 * 60 * 24 * 11 * 1000),
// convert the new time to date object and then to a human readable string
etaForHumans = new Date(etaUnix).toDateString();
// set the destination inner html to be what it already is
// plus a space and the human readable string.
wrapper.innerHTML += ' ' + etaForHumans;
<div id="productEta">Product will arrive by: </div>
Но что-то не так со сценарием