diff --git a/Stdlib/Base/SmartDateTime.php b/Stdlib/Base/SmartDateTime.php index f6127e520..44abdbe8c 100644 --- a/Stdlib/Base/SmartDateTime.php +++ b/Stdlib/Base/SmartDateTime.php @@ -239,7 +239,7 @@ class SmartDateTime extends \DateTime $w = $w + date("z", mktime(0, 0, 0, $m, $d, $y)) + 1; $w = ($w - 1) % 7 + 1; - return $w; + return $w === 7 ? 0 : $w + 1; } /**