Jump to content

Feliciahj

Member
  • Posts

    0
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Feliciahj reacted to Tenneil in Changing the date format of blog posts   
    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>  
  2. Like
    Feliciahj reacted to Europeans in Changing the date format of blog posts   
    I'm also having a problem with date formatting. The American date formatting looks jarring to our predominantly European viewers. Is there a fix coming, Squarespace?
×
×
  • 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.