Skip to content

Commit

Permalink
Use date and mktime instead of cal_days_in_month to count a month's days
Browse files Browse the repository at this point in the history
fixes #8637
  • Loading branch information
Johannes Meyer committed Mar 10, 2015
1 parent b978fdb commit d0383a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Icinga/Web/Widget/Chart/HistoryColorGrid.php
Expand Up @@ -268,7 +268,7 @@ private function createGrid()
}
$week++;
}
if ($day > cal_days_in_month(CAL_GREGORIAN, $month, $year)) {
if ($day > date('t', mktime(0, 0, 0, $month, 1, $year))) {
$month++;
if ($month > 12) {
$year++;
Expand Down

0 comments on commit d0383a2

Please sign in to comment.