public function during(Duration $duration) { $begin = new TimePoint($this->year, $this->month, $this->day, 0, 0); $end = $begin->plus($duration); return new DateInterval($begin->getDate(), $end->getDate()); }
public function isEquals(TimePoint $point) { return $this->date->isEquals($point->getDate()) && $this->time->isEquals($point->getTimeOfDay()); }