Jump to content

Tenneil

Member
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Tenneil

  1. Site URL: https://www.likeneonlove.com/ Is there any code I can use that will change the date format of my blog posts? At the moment, my latest post reads "Apr 15", but I'd like it displayed as "15 April". I managed to change the format of my summary block using the below script, but I can't seem to get it working for my actual blog page. I'm using the Skye template. It's honestly infuriating that Squarespace STILL doesn't cater to its international customers. Having flexibility in changing date formats, US-based or not, should be a given for any website service! <script> // Changes the format of date on summary items var myObj = document.getElementsByClassName('summary-metadata-item--date'); var options = { year: 'numeric', month: 'long', day: 'numeric' }; for (var i = 0; i < myObj.length; ++i) { var item = myObj[i]; var date = new Date(item.innerHTML); item.innerHTML = date.toLocaleDateString('en-GB', options); } </script>
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.