public function isDatesValid()
    {
        if ($this->startDate >= $this->endDate) {
            return false;
        }

        return ($this->endDate->diff($this->startDate)->days > 0);
    }
public function isDatesValid()
    {
        if ($this->startDate >= $this->endDate) {
            return false;
        }

        return ($this->endDate->diff($this->startDate)->days > 0);
    }
public function isDatesValid ( ) { if ( $ this -> startDate >= $ this -> endDate ) { return false ; } return ( $ this -> endDate -> diff ( $ this -> startDate ) -> days > 0 ) ; }
Validates that start date is less than end date

@return boolean
Validates that start date is less than end date