1let standardDeliveryDates=document.querySelectorAll(".js-standard-delivery-date");standardDeliveryDates.length&&getStandardDeliveryDate(),document.addEventListener("get-delivery-date",()=>{getStandardDeliveryDate()});let dispatchDates=document.querySelectorAll(".js-dispatch-date");dispatchDates.length&&getDispatchDate(),document.addEventListener("get-dispatch-date",()=>{getDispatchDate()});function getStandardDeliveryDate(){if(window.deliveryInformation&&window.deliveryInformation.cutOff){let nowTime=new Date,cutOffTime=new Date(new Date().setHours(window.deliveryInformation.cutOff.split(":")[0],window.deliveryInformation.cutOff.split(":")[1])),daysToAdd=parseInt(window.deliveryInformation.deliveryDays)+1;nowTime<cutOffTime&&(daysToAdd=parseInt(window.deliveryInformation.deliveryDays));let dateString=addDaysToDate(daysToAdd);standardDeliveryDates=document.querySelectorAll(".js-standard-delivery-date"),standardDeliveryDates.forEach(dateElem=>{dateElem.innerHTML=dateString})}}function getDispatchDate(){if(window.deliveryInformation.cutOff){let nowTime=new Date,cutOffTime=new Date(new Date().setHours(window.deliveryInformation.cutOff.split(":")[0],window.deliveryInformation.cutOff.split(":")[1])),daysToAdd=1;nowTime<cutOffTime&&(daysToAdd=0);let dateString=addDaysToDate(daysToAdd);dispatchDates=document.querySelectorAll(".js-dispatch-date"),dispatchDates.forEach(dateElem=>{dateElem.innerHTML=dateString})}}function addDaysToDate(daysToAdd){let excludedDates=window.deliveryInformation.excludedDates.split(","),deliveryDate=new Date,days=["Sun","Mon","Tues","Wed","Thur","Fri","Sat"],months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],countedDays=0,loopCount=0;for(;countedDays<=daysToAdd;){let thisDate=new Date().setDate(new Date().getDate()+loopCount),thisDateString=("0"+new Date(thisDate).getDate()).slice(-2)+"/"+("0"+(parseInt(new Date(thisDate).getMonth())+1)).slice(-2)+"/"+new Date(thisDate).getFullYear(),isExcluded=!1;excludedDates.indexOf(thisDateString)>-1&&(isExcluded=!0),window.deliveryInformation.deliveryDates[days[new Date(thisDate).getDay()]]&&isExcluded==!1&&(deliveryDate=thisDate,countedDays++),loopCount++}let deliveryDayName=days[new Date(deliveryDate).getDay()],deliveryDay=new Date(deliveryDate).getDate(),deliveryMonth=months[new Date(deliveryDate).getMonth()],deliveryString=deliveryDayName+" "+deliveryDay+" "+deliveryMonth,deliveryDateCompare=new Date(new Date(deliveryDate).setHours(0,0,0)).getTime(),todayDateCompare=new Date(new Date().setHours(0,0,0)).getTime(),tomorrowDateCompare=new Date(new Date(new Date().setDate(new Date().getDate()+1)).setHours(0,0,0)).getTime();return deliveryDateCompare===todayDateCompare?deliveryString=window.deliveryInformation.todayString.replace("{{ cutoff }}",window.deliveryInformation.cutOff):deliveryDateCompare===tomorrowDateCompare?deliveryString=window.deliveryInformation.tomorrowString:deliveryString=window.deliveryInformation.dateString.replace("{{ date }}",deliveryString),deliveryString} 2//# sourceMappingURL=/cdn/shop/t/590/assets/stmt-delivery-date.js.map?v=85573775846637436501677597346
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.