Esempio n. 1
0
 function showWeeksByID($weekID = 1, $numberOfWeeks = 1)
 {
     $xday = 1;
     for ($day = 1; $day < 358; $day++) {
         $tmp = parent::getWeekNum($day);
         if ($tmp == $weekID) {
             $xday = $day;
             break;
         }
     }
     if ($this->startOnSun) {
         $xday = $xday - 1;
     }
     $this->__construct($this->actyear, $this->actmonth, $xday, $this->GMT);
     return $this->showWeeks($numberOfWeeks);
 }
Esempio n. 2
0
	function getFirstDayTimeOfWeek($weekID = 1) {
		$unixdate = false;
		/* There should be an inverse function but for now trying some days is ok */
		$from = ($weekID-2) * 7;
		$to   = ($weekID+1) * 7;
		for ($day = $from; $day < $to; $day++) {
			$tmp = parent::getWeekNum($day);
			if ($tmp == $weekID) {
				$xday = ($this->startOnSun) ? $day - 1 : $day;
				$unixdate = $this->mkActiveTime(0, 0, 1, $this->actmonth, $xday, $this->actyear);
				break;
			}
		}
		return $unixdate;
	}