- changed format_date to allow W (week of year) in a custom format.
parent
ebcd319d63
commit
390b1e35a9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue