Skip to content

Commit

Permalink
fixbug add month 12
Browse files Browse the repository at this point in the history
  • Loading branch information
hekmatinasser committed Mar 16, 2019
1 parent 67d9b3e commit 14d06ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Verta.php
Original file line number Diff line number Diff line change
Expand Up @@ -2200,7 +2200,10 @@ public function addMonths($value)
$year += intval($month / 12) - 1;
$month = 12 + ($month % 12);
}

if($month == 0) {
$year--;
$month = 12;
}
if (($month > 6 && $month < 12 && $day == 31)) {
$day--;
}
Expand Down

0 comments on commit 14d06ab

Please sign in to comment.