public function overlaps(\DateTime $start, \DateTime $end) {
    $overlaps = FALSE;

    if ($this->dateIsEarlier($start) &&
      ($this->dateIsInRange($end) || $this->dateIsLater($end))) {
      $overlaps = TRUE;
    } elseif ($this->dateIsInRange($start) &&
      ($this->dateIsInRange($end) || $this->dateIsLater($end))) {
      $overlaps = TRUE;
    }

    return $overlaps;
  }
public function overlaps(\DateTime $start, \DateTime $end) {
    $overlaps = FALSE;

    if ($this->dateIsEarlier($start) &&
      ($this->dateIsInRange($end) || $this->dateIsLater($end))) {
      $overlaps = TRUE;
    } elseif ($this->dateIsInRange($start) &&
      ($this->dateIsInRange($end) || $this->dateIsLater($end))) {
      $overlaps = TRUE;
    }

    return $overlaps;
  }
public function overlaps ( \ DateTime $ start , \ DateTime $ end ) { $ overlaps = FALSE ; if ( $ this -> dateIsEarlier ( $ start ) && ( $ this -> dateIsInRange ( $ end ) || $ this -> dateIsLater ( $ end ) ) ) { $ overlaps = TRUE ; } elseif ( $ this -> dateIsInRange ( $ start ) && ( $ this -> dateIsInRange ( $ end ) || $ this -> dateIsLater ( $ end ) ) ) { $ overlaps = TRUE ; } return $ overlaps ; }
Returns true if the event overlaps at all with the time period within
the start and end time.

@param \DateTime $start
@param \DateTime $end
@return bool
Returns true if the event overlaps at all with the time period within the start and end time .