From 14d06ab6cf915ac37a46663569c265387d313f5c Mon Sep 17 00:00:00 2001 From: Nasser Date: Sat, 16 Mar 2019 15:01:42 +0330 Subject: [PATCH] fixbug add month 12 --- src/Verta.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Verta.php b/src/Verta.php index e9eee39..a704d56 100755 --- a/src/Verta.php +++ b/src/Verta.php @@ -2200,7 +2200,10 @@ class Verta extends DateTime { $year += intval($month / 12) - 1; $month = 12 + ($month % 12); } - + if($month == 0) { + $year--; + $month = 12; + } if (($month > 6 && $month < 12 && $day == 31)) { $day--; }