resetTimes = $resetTimes; } public function getBegin(): ?DateTime { return $this->begin; } public function setBegin(DateTime $begin): DateRange { $this->begin = $begin; if ($this->resetTimes) { $this->begin->setTime(0, 0, 0); } return $this; } public function getEnd(): ?DateTime { return $this->end; } public function setEnd(DateTime $end): DateRange { $this->end = $end; if ($this->resetTimes) { $this->end->setTime(23, 59, 59); } return $this; } }