Ejemplo n.º 1
0
 /**
  * Compares this date-time to another date-time.
  *
  * @param LocalDateTime $that The date-time to compare to.
  *
  * @return integer [-1,0,1] If this date-time is before, on, or after the given date-time.
  */
 public function compareTo(LocalDateTime $that)
 {
     return $this->date->compareTo($that->date) ?: $this->time->compareTo($that->time);
 }