In a support thread titled “Changing post date format,” markwill seeks to modify Discourse’s default date display (e.g., “Feb, 12”) to a cleaner format like “Feb 12”. After searching outdated documentation, he asks for guidance. codinghorror directs him to a meta topic explaining how to adjust the date format via the admin interface, specifically by editing the “tiny” date format string. markwill expresses concern that altering “tiny” might unintentionally affect other parts of the site expecting a short format (e.g., YY). He suggests instead modifying the template to use a more appropriate format string. pfaffman and later codinghorror clarify that editing the “tiny” string via the admin panel is safe, simple, and update-resistant — unlike overriding templates, which may break with future updates. pfaffman adds that if any layout issues arise, they can be fixed with CSS in a theme. The consensus is that changing the “tiny” format via the admin interface is the recommended, low-risk approach for customizing post date display.
So the good news is that I was a good lad and used search to locate an answer to my issue. The even better news is that I found it has been covered numerous times. And yet more good news is that the topics I found neatly pointed to the same page for the answer. The bad news is that this page is no longer available
So, regretfully, I’ll ask here.
Where do I define the date format such that I don’t have this weird “Feb, 12” vs “Feb 12” thing? I’ve also searched settings and see various options but it’s not clear which one I should change.
And, just to be provocative, what’s the logic behind the rather confusing default date format (see above), given that there have been quite a few comments over time that this is confusing.
Thank you, Jeff. It’s not too easy to distinguish topics that are wildly out of date :), given that the one you reference is almost 4 years old.
I did see that topic but it seemed like a bit of a hack. A string with “tiny” in the name feels like it should use YY. Modifying it to use YYYY may resolve one issue, but could have unintended consequences elsewhere, where it might be the preferred string precisely because it’s “tiny”.
Without knowing too much yet about where I’d make this change, I’m guessing a better approach would be to find the HTML that currently references the tiny string for post date and modify that to instead use the long form. I don’t know enough yet, though, to know where to do that and whether that makes the change vulnerable to product updates later.
What I do know is that I’m really not a big fan of that weird date format
Not trying to be argumentative, Jay, but why is changing the tiny string definition to use the long form and then hunting around to find / test other references to that string easier than simply changing the relevant template to use the appropriately named long form?
The former seems rather cumbersome for what seems like a simple change.
Are there issues with updating the “template” (not sure if Discourse used that term) to use the preferred format?
Changing the value in the web interface is easy and doesn’t require you to override the template, which has lots of other stuff in it, that might change in the future. It is reasonably likely that nothing will break, and if it does, the css you’d change in a theme is exactly what you’d do by overriding the template. Further, if you override the template and it changes in the future you’ll have to find out that it changed and fix your version whenever that happens.
This is simply editing text in the same way you would edit text anywhere in Discourse via Admin, Customize. It is not risky at all and cannot be “broken” by updates. It is the simplest and easiest way to achieve the customization you desire.