Post date display

AI-generated summary

Post date display discussion summary:

Loki proposes adding a site setting to display the year in four digits instead of with an apostrophe, citing user complaints about difficulty noticing the apostrophe. Don responds that this can be achieved by changing the date format in the /admin/customize/site_texts section, specifically by replacing 'YY with YYYY in the js.dates.tiny.date_year format string. This change will affect the date format everywhere in Discourse, not just in posts. Loki thanks Don for the help. Dannii asks if it’s possible to adjust the time period after which the date format changes from month and day (e.g., Mar 11) to month and year (e.g., Mar '22), suggesting a 6-month threshold instead of the current 1-year threshold.

The date of posts are displayed using an apostrophe to indicate a year and no apostrophe to indicate a day of the month (Apr '18 is April of 2018, while Apr 18 is April 18th of this year).

We get fairly frequent complaints from our users that it is hard to see or notice the apostrophe. This is especially true on mobile and for new users who are not familiar with the date format.

It sure would be great if we had a site settings option to display the year as four digits instead of with the apostrophe. It would seem that replacing the apostrophe with two digits would not create any great formatting problems.

What do you think? Is this something that might be accomplished?

Hello,

You can change it in /admin/customize/site_texts.

Search to 'YY will list the related date format strings.

In posts the date use this format: js.dates.tiny.date_year
Here you can change the date format 'YY to YYYY should be what you would like to achieve. :slightly_smiling_face:

Note: This will change the date format everywhere it is used in Discourse, not only in posts.

That’s fantastic. Thanks for the help!

Currently if a post is less than a year old it will show the month and day form (ex, Mar 11). Is it possible to change this period, say to 6 months, so that it would show month and year like older posts instead (Mar '22)?