From d22ff59b824469b8197b18452339092d6b10e1cd Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 2 Sep 2017 19:10:29 +0200 Subject: [PATCH] fixes #118 --- Stdlib/Base/SmartDateTime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } /**