# How to change the date format in summary emails?

**URL:** https://meta.discourse.org/t/how-to-change-the-date-format-in-summary-emails/64766
**Category:** UX
**Created:** [2017年六月19日 19:03 UTC](https://meta.discourse.org/t/how-to-change-the-date-format-in-summary-emails/64766 "2017-06-19T19:03:17Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [2017年六月19日 19:03 UTC](https://meta.discourse.org/t/how-to-change-the-date-format-in-summary-emails/64766/1 "2017-06-19T19:03:17Z")

</div>

I believe I have customized all text content elements containing dates but my summary emails don’t seem to be affected by that, they’re still going out with the “Month Day” format instead of “Day Month”. What am I missing? Where is the date format for digest emails set?

---

<div class="post-metadata">

### Author: ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)
#### Post date: [2017年六月27日 16:23 UTC](https://meta.discourse.org/t/how-to-change-the-date-format-in-summary-emails/64766/2 "2017-06-27T16:23:11Z")

</div>

I think you want this:

> <https://github.com/discourse/discourse/blob/main/app/views/email/_post.html.erb#L18>

But I’m not 100% sure that it used for digests.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2018年七月2日 16:15 UTC](https://meta.discourse.org/t/how-to-change-the-date-format-in-summary-emails/64766/3 "2018-07-02T16:15:55Z")

</div>

> [@tophee](#):
>
> Where is the date format for digest emails set?

> <https://github.com/discourse/discourse/blob/7eb5f783438bc0ea86fe22ffe6f2bb6c7d369d73/app/views/user_notifications/digest.html.erb#L115>

Which is defined in

> <https://github.com/discourse/discourse/blob/0dee603ffca1c733e9fdcfcb18a45471e09d4872/app/mailers/user_notifications.rb#L132-L138>

Which means you’ll have to change the `short_no_year` strings to change the date format in digests.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [2018年七月2日 17:34 UTC](https://meta.discourse.org/t/how-to-change-the-date-format-in-summary-emails/64766/4 "2018-07-02T17:34:53Z")

</div>

Wow, thanks a lot! I [missed that one because it doesn’t include “date” as a string](https://meta.discourse.org/t/change-to-dd-mmm-mmm-yy-for-post-dates/13625/35). Are there any other “hidden” date or time format fields?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2018年七月2日 17:36 UTC](https://meta.discourse.org/t/how-to-change-the-date-format-in-summary-emails/64766/5 "2018-07-02T17:36:02Z")

</div>

> [@tophee](#):
>
> Are there any other “hidden” date or time format fields?

I think most of them are [here](https://github.com/discourse/discourse/blob/b4cb31d999341e408ae9a53195ecdb8ece948b2b/config/locales/server.en.yml#L18-L44).

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [2018年七月2日 17:47 UTC](https://meta.discourse.org/t/how-to-change-the-date-format-in-summary-emails/64766/6 "2018-07-02T17:47:01Z")

</div>

Indeed, I found two more. But if those that you are linking to are “most of them” why is the list of date fields in `admin/site-settings/customize/site_texts` so much longer?Felt like dozens, but at least 20, I’d say.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2018年七月2日 17:51 UTC](https://meta.discourse.org/t/how-to-change-the-date-format-in-summary-emails/64766/7 "2018-07-02T17:51:01Z")

</div>

The others are the ones provided by rails or used in the web app (those starting with `js.`).
