Four digit years

AI-generated summary

Four Digit Years in Discourse

A discussion about displaying four digit years in Discourse began with a feature request by peternlewis. They pointed out that the current 'YY format can be easily confused with the day of the month, especially when the apostrophe is hard to see due to theme configurations.

ccstone agreed, sharing an experience with users mistaking the 'YY format on the Keyboard Maestro Forum.

hawm provided a solution by suggesting to customize the js.dates in /admin/customize/site_texts using Moment.js format. peternlewis successfully implemented the change, updating the format to YYYY.

In a separate conversation, codinghorror mentioned that users can customize any text, including date formats, on their sites. peternlewis responded, sharing an instance where a punctuation mark was easily overlooked.

Lastly, hawm inquired about the Discourse team’s thoughts on the recent Moment.js project status. sam replied that they are aware of the status and currently shopping for a replacement.

Is there any way to configure four digit years in Discourse. Or alternatively, as a feature request, can we please have four digit years in Discourse?

For example:

This is easily confused to read 17th of January, as opposed to an archaic post from 4 years ago.

Depending on the dark/light setting and other theme configurations, the apostrophe can be even less visible.

Thanks.

I think this is highly desirable.

We’ve had quite a number of users mistake the 'YY for the day, and that’s spawned confused and unnecessary comments on the Keyboard Maestro Forum.

-Chris

(Keyboard Maestro Forum Moderator)

You can customize it by search js.dates on /admin/customize/site_texts.
And the time format document:

By the way, what @team thoughts about the recent Moment.js project-status?

Thanks, I went to Admin, Customize, Text, searched for js.dates, then changed it to search for 'yy, and changed all of them to YYYY.

Actually, can I just confirm it is capital Y for YYYY? Because I know I’ve been bitted in regex where it is yyyy for year, but YYYY for year of "Week of Year" which is different a few days each year.

I checked and the original was 'YY so I presume that capital Y is correct.

Not really, not unless. you didn’t see the period in the middle of this sentence :wink:

That being said, the idea is you can customize any text however you like on your site, including date formats.

Actually, when I read that sentence I read right over the period, so yeah, I’d say easily missed.

We are aware, and shopping for a replacement