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 baa14a591..a83645b54 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -131,7 +131,13 @@ function format_date($timestamp, $type = "medium", $format = "") { $date = t(date("l", $timestamp)) .", ". t(date("F", $timestamp)) ." ". date("d, Y - H:i", $timestamp); break; case "custom": - $date = date($format, $timestamp); + for ($i=strlen($format);$i>=0;$c=$format[--$i]) { + if (strstr("DFlMSw",$c)) + $date=t(date($c,$timestamp)).$date; + else if (strstr("AaBdgGhHiIjLmnrstTUYyZz",$c)) + $date=date($c,$timestamp).$date; + else $date=$c.$date; + } break; default: $date = t(date("l", $timestamp)) .", ". date("m/d/Y - H:i", $timestamp); |