I noticed an error in the Calendar helper's render method.
The sixth week doesn't render with the code that's in the book:
if($day < strftime("%d",$lastdate)) { // check if there is a sixth week
$out .= '<tr>';
for($i=22; $i<=28; $i++) {
if(strftime("%d", $lastdate) < $day) {
$out .= '<td> </td>';
} else {
$out .= '<td>'.$day.'<br />';
$out .= $this->events($month, $day, $year, $events);
$out .= '</td>';
$day++;
}
}
$out .= '</tr>';
}
As far as I can tell it needs to be changed to the following to work:
if($day <= strftime("%d",$lastdate)) { // check if there is a sixth week
$out .= '<tr>';
for($i=36; $i<=42; $i++) {
if(strftime("%d", $lastdate) < $day) {
$out .= '<td> </td>';
} else {
$out .= '<td>'.$day.'<br />';
$out .= $this->events($month, $day, $year, $events);
$out .= '</td>';
$day++;
}
}
$out .= '</tr>';
}