From 390b1e35a9ab335e2441ed119a14577a500e2e51 Mon Sep 17 00:00:00 2001
From: Kjartan Mannes <kjartan@2.no-reply.drupal.org>
Date: Fri, 4 Oct 2002 17:10:16 +0000
Subject: [PATCH] - changed format_date to allow W (week of year) in a custom
 format.

---
 includes/common.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/includes/common.inc b/includes/common.inc
index f5564baa8ec5..e1936c015573 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -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;
-- 
GitLab