summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2006-12-20 15:59:50 +0000
committersvncommit <devs@roundcube.net>2006-12-20 15:59:50 +0000
commit8c8b2a487ad8bade7c7ec4b4fb32b63237b6e0d3 (patch)
tree0d574bbfe435f9737df9adf9f2ae54a94c41f1d1
parent04c61804f81a3ed839ef35e7fa70185f713498fd (diff)
Allow 12 hour date to display for emails sent today (Doug Mandell).
-rw-r--r--config/main.inc.php.dist3
-rw-r--r--program/include/main.inc2
2 files changed, 4 insertions, 1 deletions
diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index fb227c461..490c62365 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -113,6 +113,9 @@ $rcmail_config['date_short'] = 'D H:i';
// use this format for detailed date/time formatting
$rcmail_config['date_long'] = 'd.m.Y H:i';
+// use this format for today's date display
+$rcmail_config['date_today'] = 'H:i';
+
// add this user-agent to message headers when sending
$rcmail_config['useragent'] = 'RoundCube Webmail/0.1b';
diff --git a/program/include/main.inc b/program/include/main.inc
index c6370eae9..c57aa8a9f 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1710,7 +1710,7 @@ function format_date($date, $format=NULL)
// define date format depending on current time
if ($CONFIG['prettydate'] && !$format && $timestamp > $today_limit)
- return sprintf('%s %s', rcube_label('today'), date('H:i', $timestamp));
+ return sprintf('%s %s', rcube_label('today'), date($CONFIG['date_today'] ? $CONFIG['date_today'] : 'H:i', $timestamp));
else if ($CONFIG['prettydate'] && !$format && $timestamp > $week_limit)
$format = $CONFIG['date_short'] ? $CONFIG['date_short'] : 'D H:i';
else if (!$format)