How to customise the Squarespace blog date format
Blog publication dates help visitors understand how current your content is. Regardless of what youβre publishing, readers often make a judgement about the relevance of an article within a fraction of a second based on its publication date.
Unfortunately, Squarespace presents blog dates inconsistently.
Blog list/grid pages
On blog list and grid pages, dates are displayed in a numeric format such as 03/04/2026. These purely numeric dates can be ambiguous because the order of the day and month varies around the world. Is 03/04/2026 the 3rd of April or the 4th of March? The answer depends on where your visitor lives.
Individual blog posts
Individual blog posts have the opposite problem. Squarespace replaces the numeric date with a friendlier but shortened month name, but removes the publication year altogether! An article published several years ago may simply display β3 Aprilβ, giving readers no indication of the year it was published.
From a user experience perspective, neither approach is ideal. Interfaces should strive for consistency so visitors don't have to interpret different date formats as they move around a website. Dates should also be immediately understandable without requiring visitors to think about regional conventions or guess how old an article might be.
Formatting Squarespace blog post dates consistently
If you're looking to add the publication year to Squarespace blog posts, show complete publication dates, or customise the Squarespace blog date format, this is a simple way to achieve it.
The code I have written below addresses both issues by displaying dates in a single, consistent format throughout your blog. Blog list and grid pages use the full month name instead of numeric dates, while individual blog posts also include the publication year. The formatting automatically follows your website's language and regional settings, so visitors see dates in a format that feels natural for your audience.
Whilst logged on to your site, go to the Code Injection panel (where is this?).
Youβll see several panels where you can add code. Scroll down to the panel titled FOOTER and then paste the following code into it.
<!-- Format Squarespace blog post dates consistently ------------------->
<!-- Copyright Soundfocus Digital Ltd https://sf.digital --------------->
<!-- Use freely in Code Injection. Do not republish in part or full. -->
<script>
window.addEventListener("DOMContentLoaded",()=>{var e={year:"numeric",month:"long",day:"numeric"},t=Static?.SQUARESPACE_CONTEXT?.website?.language||"en-US";function a(a){return a.toLocaleDateString(t,e)}t.match(/^[a-z]{2}-[A-Z]{2}$/)||(t="en-US");var n=document.querySelector('meta[itemprop="datePublished"]');if(n){var o,r=n.content.slice(0,10).split("-"),l=new Date(r[0],r[1]-1,r[2]);document.querySelectorAll("time.dt-published.blog-meta-item.blog-meta-item--date span").forEach(e=>{e.textContent=a(l)})}document.querySelectorAll(".blog-masonry .blog-date, .blog-basic-grid .blog-date").forEach(e=>{var t,n=e.textContent.trim().match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);if(n){var o=new Date(n[3],n[2]-1,n[1]);e.textContent=a(o)}})});
</script>
<!-- End of format Squarespace blog post dates consistently ------------>
When youβve saved your work, blog posts should show the date in the form β19 June 2019β or similar. The order of the date and month is determined by your Language & Region settings. US sites will show the month first, followed by the date and year whereas my example is for the UK.