- Support strftime's format modifiers in date_* options (#1484806)

release-0.6
alecpl 15 years ago
parent 72cd3c1a76
commit b6b593416b

@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
- Support strftime's format modifiers in date_* options (#1484806)
- Support %h variable in 'smtp_server' option (#1485766)
- Show SMTP errors in browser (#1485927)
- Allow WBR tag in HTML message (#1485960)

@ -155,13 +155,13 @@ $rcmail_config['des_key'] = 'rcmail-!24ByteDESkey*Str';
// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
$rcmail_config['language'] = null;
// use this format for short date display
// use this format for short date display (date or strftime format)
$rcmail_config['date_short'] = 'D H:i';
// use this format for detailed date/time formatting
// use this format for detailed date/time formatting (date or strftime format)
$rcmail_config['date_long'] = 'd.m.Y H:i';
// use this format for today's date display
// use this format for today's date display (date or strftime format)
$rcmail_config['date_today'] = 'H:i';
// add this user-agent to message headers when sending

@ -893,6 +893,9 @@ function format_date($date, $format=NULL)
else if (!$format)
$format = $CONFIG['date_long'] ? $CONFIG['date_long'] : 'd.m.Y H:i';
// strftime() format
if (preg_match('/%[a-z]+/i', $format))
return strftime($format, $timestamp);
// parse format string manually in order to provide localized weekday and month names
// an alternative would be to convert the date() format string to fit with strftime()

Loading…
Cancel
Save