diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc index b0cd37a9f..6aeb02032 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -1139,9 +1139,15 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL $date = ''; for ($i = 0; $i < $max; $i++) { $c = $format[$i]; - if (strpos('AaDFlM', $c) !== FALSE) { + if (strpos('AaDlM', $c) !== FALSE) { $date .= t(gmdate($c, $timestamp), array(), $langcode); } + else if ($c == 'F') { + // Special treatment for long month names: May is both an abbreviation + // and a full month name in English, but other languages have + // different abbreviations. + $date .= trim(t('!long-month-name '. gmdate($c, $timestamp), array('!long-month-name' => ''), $langcode)); + } else if (strpos('BdgGhHiIjLmnsStTUwWYyz', $c) !== FALSE) { $date .= gmdate($c, $timestamp); } |