Here is a snippet of code that I am grappling with:
<div id="next-shipment"></div>
var date = new Date(); // today using client's timezone
date.setDate(date.getDate() + 1); // move to tomorrow
date.setUTCHours(11,0,0,0); // set time using UTC(GMT) timezone
document.getElementById("next-shipment").textContent = date.toLocaleString();
To address this issue, I decided to create a file named next-shipment.js in Shopify within the "Assets folder" and then proceeded to paste the Javascript code there.
Despite my efforts, I am facing difficulty in merging these two codes in a way that when I add the HTML line
<div id="next-shipment"></div>
on the homepage, nothing seems to appear.