Date formatting in Discourse

I’m finding the date formatting for comment time-stamps here in Discourse quite confusing. A post from 13 June 2017 will be marked ‘Jun 13’; a post from June 2013 will be marked ‘Jun '13’. Just an apostrophe’s difference.

Would it be possible to change the date formatting? My suggestions would be to do one of the following:

  • For dates in the current year, put the date before the month, e.g. ‘13 Jun’.
  • For dates from previous years, use the full year, e.g. ‘Jun 2013’.

I admit that, as a Brit, ‘13 Jun’ is more natural to me for the date and month, but of course it won’t be so natural to people from some other nations, e.g. Americans, who use ‘month date’. So I’d be interested to hear other people’s opinions.

1 Like

So yeah, about that.

Here’s all the date formats Discourse is using:

dates.long_date                 = MMMM D, YYYY h:mma
dates.short_date                = D MMM, YYYY
dates.short_date_no_year        = D MMM
js.dates.full_no_year_no_time   = MMMM Do
js.dates.full_with_year_no_time = MMMM Do, YYYY
js.dates.long_date_with_year    = MMM D, 'YY LT
js.dates.long_date_without_year = MMM D, LT
js.dates.long_no_year           = MMM D h:mm a
js.dates.long_no_year_no_time   = MMM D
js.dates.long_with_year         = MMM D, YYYY h:mm a
js.dates.long_with_year_no_time = MMM D, YYYY
js.dates.medium.date_year       = MMM D, 'YY
js.dates.time                   = h:mm a
js.dates.timeline_date          = MMM YYYY
js.dates.tiny.date_month        = MMM D
js.dates.tiny.date_year         = MMM 'YY

You are probably running in the conflict between js.dates.tiny.date_year and js.dates.tiny.date_month. To American natives, this is no big deal and pretty obvious, but I agree that we do a bad job of providing easy access to everyone. I will work through the list and make them more international.

Thanks for pointing it out.

1 Like

It’s not about making them ‘international’ (I think the American ‘mmm d’ format is probably used more widely than the ‘d mmm’ format) but distinguishing a date and month from this year more clearly from a month and year from a previous year.

I keep seeing a date stamp e.g. 'May ‘14’ and thinking ‘Oh, that was from last month’ when it was actually from 3 years ago. That’s my confusion. I’m happy to keep ‘mmm d’ if posts from previous years are more clearly distinguished from them, e.g. ‘mmm yyyy’ rather than ‘mmm yy’.

Thanks for your responsiveness, and I look forward to your amazing creative solution!

Are there some user settings where I can choose which date formats I see in timestamps? If so, that could be my solution.

Okay, that’s what I did now. I replaced all instances of 'YY with YYYY. In theory, that should not break the layout. If it does, let me know.

There is not, and I don’t there will be one in the close future. :slight_smile:

That’s so much better. Thank you! <3

The layout looks fine so far…

1 Like