public function contains(DateTime $dateTime) : bool
    {
        return $this->from->isEarlierThanOrEqualTo($dateTime) && $this->until->isLaterThan($dateTime);
    }
public function contains(DateTime $dateTime) : bool
    {
        return $this->from->isEarlierThanOrEqualTo($dateTime) && $this->until->isLaterThan($dateTime);
    }
public function contains ( DateTime $ dateTime ) : bool { return $ this -> from -> isEarlierThanOrEqualTo ( $ dateTime ) && $ this -> until -> isLaterThan ( $ dateTime ) ; }
Determines if the range contains a specified date and time.

@param DateTime $dateTime

@return bool
Determines if the range contains a specified date and time .