Commit 390b1e35 authored by Kjartan's avatar Kjartan

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

parent ebcd319d
...@@ -536,10 +536,10 @@ function format_date($timestamp, $type = "medium", $format = "") { ...@@ -536,10 +536,10 @@ function format_date($timestamp, $type = "medium", $format = "") {
case "custom": case "custom":
for ($i = strlen($format); $i >= 0; $c = $format[--$i]) { for ($i = strlen($format); $i >= 0; $c = $format[--$i]) {
if (strstr("DFlMSw", $c)) { if (strstr("DFlMSw", $c)) {
$date = t(date($c, $timestamp)).$date; $date = t(date($c, $timestamp)) . $date;
} }
else if (strstr("AaBdgGhHiIjLmnrstTUYyZz", $c)) { else if (strstr("AaBdgGhHiIjLmnrstTUWYyZz", $c)) {
$date = date($c, $timestamp).$date; $date = date($c, $timestamp) . $date;
} }
else { else {
$date = $c.$date; $date = $c.$date;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment