/** * Checks if the given date is included in the range. * * @param Date $date The date to compare to. * * @return boolean * * @since 2.0.0 */ public function includes(Date $date) { return $this->range->includes(new DateTime($date)); }
/** * Checks if ranges overlap with each other. * * @param DateTimeRange $range The range to compare to. * * @return boolean * * @since 2.0.0 */ public function overlaps(DateTimeRange $range) { return $range->includes($this->start) || $range->includes($this->end) || $this->includesRange($range); }