function mkWeeksBody($numberOfWeeks) { $this->resetSelectedToToday(); $out = $this->mkMonthRow(); for ($week = 0; $week < $numberOfWeeks; $week++) { $out .= '<tr class="daysRow">'; $weeknumber=parent::mkWeekNum($this->actday); $weekday=parent::getWeekday($this->actday); if ($this->startOnSun && ($weekday>4 || $weekday==0)) $weeknumber=parent::mkWeekNum($this->actday+1); // week starts on Monday in date("w") if ($this->weekNum) $out.="<td class=\"".$this->cssWeekNum."\">".$weeknumber."</td>"; for ($i = 0; $i <= 6; $i++) { $out.=$this->mkDay($this->actday); $this->__construct($this->actyear, $this->actmonth, $this->actday+1, $this->GMT); $this->resetSelectedToToday(); } $out.="</tr>\n"; if ($this->actday+6>$this->getDaysThisMonth() && $week<$numberOfWeeks-1) $out.= $this->mkMonthRow(false); elseif ($this->actday==1 && $week<$numberOfWeeks-1) $out.=$this->mkMonthRow(); } return $out; }