src/LocalDateTime.php
public function compareTo(LocalDateTime $that) : int
    {
        return $this->date->compareTo($that->date) ?: $this->time->compareTo($that->time);
    }
public function compareTo(LocalDateTime $that) : int
    {
        return $this->date->compareTo($that->date) ?: $this->time->compareTo($that->time);
    }
public function compareTo ( LocalDateTime $ that ) : int { return $ this -> date -> compareTo ( $ that -> date ) ? : $ this -> time -> compareTo ( $ that -> time ) ; }
Compares this date-time to another date-time.

@param LocalDateTime $that The date-time to compare to.

@return int [-1,0,1] If this date-time is before, on, or after the given date-time.
Compares this date - time to another date - time .