diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-07 09:11:21 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-07 09:11:21 +0000 |
| commit | 8fff54e72bc627e608a7b8fde238551d4e36bc2c (patch) | |
| tree | 5c069fc1a7f6af2520c6b582f2b6971bc593ef99 /roundcubemail/program/include | |
| parent | 55200135e3eac05c9d307d2a733aff02c87faf61 (diff) | |
- Support strftime's format modifiers in date_* options (#1484806)
git-svn-id: https://svn.roundcube.net/trunk@2718 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 5ff5f499b..d8b832844 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -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() |
