diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php
index b09be7e..7f51afa 100644
--- a/core/modules/views/src/Plugin/views/query/Sql.php
+++ b/core/modules/views/src/Plugin/views/query/Sql.php
@@ -1797,7 +1797,16 @@ public function getDateFormat($field, $format) {
           'A' => '',
         );
         $format = strtr($format, $replace);
-        $expression = "strftime('$format', $field, 'unixepoch')";
+        // SQLite does not have a ISO week substitution string, so it needs
+        // special handling.
+        // @see http://en.wikipedia.org/wiki/ISO_week_date#Calculation
+        // @see http://stackoverflow.com/a/15511864/1499564
+        if ($format === '%W') {
+          $expression = "((strftime('%j', date(strftime('%Y-%m-%d', $field, 'unixepoch'), '-3 days', 'weekday 4')) - 1) / 7 + 1)";
+        }
+        else {
+          $expression = "strftime('$format', $field, 'unixepoch')";
+        }
         // The expression yields a string, but the comparison value is an
         // integer in case the comparison value is a float, integer, or numeric.
         // All of the above SQLite format tokens only produce integers. However,
diff --git a/core/modules/views/src/Tests/Handler/ArgumentDateTest.php b/core/modules/views/src/Tests/Handler/ArgumentDateTest.php
index 4c66e79..c6e2957 100644
--- a/core/modules/views/src/Tests/Handler/ArgumentDateTest.php
+++ b/core/modules/views/src/Tests/Handler/ArgumentDateTest.php
@@ -148,6 +148,16 @@ public function testMonthHandler() {
    */
   public function testWeekHandler() {
     $this->container->get('database')->update('views_test_data')
+      ->fields(array('created' => gmmktime(0, 0, 0, 9, 26, 2008)))
+      ->condition('id', 1)
+      ->execute();
+
+    $this->container->get('database')->update('views_test_data')
+      ->fields(array('created' => gmmktime(0, 0, 0, 2, 29, 2004)))
+      ->condition('id', 2)
+      ->execute();
+
+    $this->container->get('database')->update('views_test_data')
       ->fields(array('created' => gmmktime(0, 0, 0, 1, 1, 2000)))
       ->condition('id', 3)
       ->execute();
@@ -164,11 +174,27 @@ public function testWeekHandler() {
 
     $view = Views::getView('test_argument_date');
     $view->setDisplay('embed_3');
-    // The first jan 2000 was still in the last week of the previous year.
-    $this->executeView($view, array(52));
+    // Check the week calculation for a leap year.
+    // @see http://en.wikipedia.org/wiki/ISO_week_date#Calculation
+    $this->executeView($view, array('39'));
     $expected = array();
     $expected[] = array('id' => 1);
+    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $view->destroy();
+
+    $view->setDisplay('embed_3');
+    // Check the week calculation for the 29th of February in a leap year.
+    // @see http://en.wikipedia.org/wiki/ISO_week_date#Calculation
+    $this->executeView($view, array('09'));
+    $expected = array();
     $expected[] = array('id' => 2);
+    $this->assertIdenticalResultset($view, $expected, $this->columnMap);
+    $view->destroy();
+
+    $view->setDisplay('embed_3');
+    // The first jan 2000 was still in the last week of the previous year.
+    $this->executeView($view, array('52'));
+    $expected = array();
     $expected[] = array('id' => 3);
     $this->assertIdenticalResultset($view, $expected, $this->columnMap);
     $view->destroy();
