Author Topic: Display of "Today" label ignores date formatting.  (Read 2898 times)

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Display of "Today" label ignores date formatting.
« on: September 11, 2009, 04:49:10 PM »
This is a minor nit, but I've set my date strings to look this this:

$rcmail_config['date_short'] = 'l, g:i a';
$rcmail_config['date_long'] = 'n/j/y, g:i a';

This has the effect of putting a comma after the day or date before displaying the time.  For example:

Thursday, 2:37 pm
9/2/09, 9:27 am

However, when an email is dated "today" the comma is not displayed:

Today 4:35 pm

Why is "Today" ignoring the comma formatting character that I've specified in the my date strings?

When I was using 0.3RC I "fixed" this by editing program/localization/en_GB/labels.inc (or US for the other localization) and using:

$labels['today'] = 'Today,';

This forced the label to be "Today," rather than "Today" - so I hard-coded the comma in.  But I shouldn't have to do that.

Of course when I just now upgraded to the final release of 0.3, the labels.inc file was replaced.  It's easy enough for me to set this again, but I thought I'd ask if there is an easier way of doing this - or if this is some sort of bug.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Display of "Today" label ignores date formatting.
« Reply #1 on: September 12, 2009, 03:45:48 AM »
There is an date_today config option as well but it only allows you to change what is after `Today `. So the best way at the moment really is to change that text. May be open a ticket on trac and see if the devs will change it so you can format the entire thing from the config.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline Jason_Bassford

  • Jr. Member
  • **
  • Posts: 13
Display of "Today" label ignores date formatting.
« Reply #2 on: September 13, 2009, 11:16:23 AM »
Quote from: JohnDoh;21189
There is an date_today config option as well but it only allows you to change what is after `Today `.
That one only lets you set the formatting for the time.  Okay, I may file a bug.

Edit: Filed Display of "Today" label ignores date formatting. (#1486120).
« Last Edit: September 13, 2009, 11:21:26 AM by Jason_Bassford »