- changed format_date to allow W (week of year) in a custom format.

4.1.x
Kjartan Mannes 2002-10-04 17:10:16 +00:00
parent ebcd319d63
commit 390b1e35a9
1 changed files with 3 additions and 3 deletions

View File

@ -536,10 +536,10 @@ function format_date($timestamp, $type = "medium", $format = "") {
case "custom":
for ($i = strlen($format); $i >= 0; $c = $format[--$i]) {
if (strstr("DFlMSw", $c)) {
$date = t(date($c, $timestamp)).$date;
$date = t(date($c, $timestamp)) . $date;
}
else if (strstr("AaBdgGhHiIjLmnrstTUYyZz", $c)) {
$date = date($c, $timestamp).$date;
else if (strstr("AaBdgGhHiIjLmnrstTUWYyZz", $c)) {
$date = date($c, $timestamp) . $date;
}
else {
$date = $c.$date;