public function equals(DateTimeBase $other) : bool
    {
        $dateTime      = $this->dateTime;
        $otherDateTime = $other->dateTime;

        return $dateTime == $otherDateTime
                && $dateTime->getTimezone()->getName() === $otherDateTime->getTimezone()->getName();
    }
public function equals(DateTimeBase $other) : bool
    {
        $dateTime      = $this->dateTime;
        $otherDateTime = $other->dateTime;

        return $dateTime == $otherDateTime
                && $dateTime->getTimezone()->getName() === $otherDateTime->getTimezone()->getName();
    }
public function equals ( DateTimeBase $ other ) : bool { $ dateTime = $ this -> dateTime ; $ otherDateTime = $ other -> dateTime ; return $ dateTime == $ otherDateTime && $ dateTime -> getTimezone ( ) -> getName ( ) === $ otherDateTime -> getTimezone ( ) -> getName ( ) ; }
Returns whether the DateTimeBase is equal to the supplied date.

@param DateTimeBase $other

@return bool
Returns whether the DateTimeBase is equal to the supplied date .