public function getLastOccurrence($before_timestamp = null) {
		if ($before_timestamp === null) {
			$before_timestamp = time();
		}
		
		$before_timestamp = (int) $before_timestamp;
		
		$prev = false;
		if ($this->isRecurring()) {
			$starttimes = $this->getStartTimes($this->getStartTimestamp(), $before_timestamp);
			
			if ($starttimes) {
				$prev = end($starttimes);
			}
		}
		else {
			$prev = $this->getStartTimestamp();
			
			if ($prev > $before_timestamp) {
				$prev = false; // there is no occurrence before the timestamp
			}
		}
		
		return $prev;
	}