# How to change date display format in Dawn theme?

**URL:** <https://forum.ghost.org/t/how-to-change-date-display-format-in-dawn-theme/46771>\
**Category:** Themes\
**Created:** [April 22, 2024, 10:46pm UTC](https://forum.ghost.org/t/how-to-change-date-display-format-in-dawn-theme/46771 "2024-04-22T22:46:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pl22](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pl22](https://forum.ghost.org/u/pl22)\
**Post date:** [April 22, 2024, 10:46pm UTC](https://forum.ghost.org/t/how-to-change-date-display-format-in-dawn-theme/46771/1 "2024-04-22T22:46:46Z")

</div>

This is on the Home / Navigation page. Rather than Month / Day to the left of each post title (e.g. “APR 22”) I want it to be month / year (e.g. “APR 2024”). What’s the simplest way to do this? Thanks!

---

<div class="post-metadata">

**Author:** ![jannis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jannis/32/39718_2.png) [@jannis](https://forum.ghost.org/u/jannis)\
**Post date:** [April 23, 2024, 4:42am UTC](https://forum.ghost.org/t/how-to-change-date-display-format-in-dawn-theme/46771/2 "2024-04-23T04:42:15Z")

</div>

The date formatting comes from the theme files, specifically this part here:

> <https://github.com/TryGhost/Dawn/blob/03ada24107440a3bc58e99e3d24c10e0c4ea9faf/partials/loop.hbs#L3-L10>

To change that to the format you want, you could implement the following:

```auto
<div class="feed-calendar">
    <div class="feed-calendar-month">
        {{date published_at format="MMM"}}
    </div>
    <div class="feed-calendar-year">
        {{date published_at format="YYYY"}}
    </div>
</div>

```

For reference, here is the documentation on the date helper: [Ghost Handlebars Theme Helpers: date](https://ghost.org/docs/themes/helpers/date/)

Keep in mind that you’d need to build the theme before re-uploading it. You can do that by running `yarn zip` / `npm run zip` (you’d need Node.js installed for that).

---

<div class="post-metadata">

**Author:** ![pl22](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pl22](https://forum.ghost.org/u/pl22)\
**Post date:** [April 23, 2024, 7:13pm UTC](https://forum.ghost.org/t/how-to-change-date-display-format-in-dawn-theme/46771/3 "2024-04-23T19:13:50Z")

</div>

Thank you! But I should have clarified that this is for a Ghost Pro site, not a self-hosted one. Can I implement this with code injection?

---

<div class="post-metadata">

**Author:** ![jannis](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/jannis/32/39718_2.png) [@jannis](https://forum.ghost.org/u/jannis)\
**Post date:** [April 23, 2024, 7:16pm UTC](https://forum.ghost.org/t/how-to-change-date-display-format-in-dawn-theme/46771/4 "2024-04-23T19:16:20Z")

</div>

Phew, tricky. From the top of my head, I’d say you’d have to query the content API to fetch the dates and then format them there.

I see this as the perfect use case of not using code injection, to be honest, because it will get quite messy and just a workaround for something that Ghost (and the theme helpers) can do natively – though I understand the restrictions in your hosting plan.

Maybe somebody else has some ideas 🤔
