summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-09-12 13:30:42 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-09-12 13:30:42 +0000
commitb3fe5b9cbff70dd29a574e6770f32bcb48c6a78c (patch)
treec51571f35074d50faecc3f420a005afd5e01ce2b
parentffa1f6ef6932f470400377883025f9187da2468d (diff)
downloadbrdo-b3fe5b9cbff70dd29a574e6770f32bcb48c6a78c.tar.gz
brdo-b3fe5b9cbff70dd29a574e6770f32bcb48c6a78c.tar.bz2
#63352 by kkaefer: add special prefix to long month names in format_date so May is recognized differently in short and long formats
-rw-r--r--includes/common.inc8
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);
}