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 = "") {
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;
......
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