Mode = $mode; } public function GetStartOfUnit() { return $this->Date->getTimestamp(); } public function GetEndOfUnit() { $nextDate = new DateTime($this->Date->format('c')); $nextDate->modify('+1 ' . $this->Mode); return $nextDate->getTimestamp(); } }