code: public int compareTo(Day object)
    {
       if (object == null)
          throw new IllegalArgumentException("day cannot be null");
       
       Day day = (Day)object;     
  
      return localDate.compareTo(day.localDate);
    }
docs: Compare this day to the specified day. If object is
  not of type Day a ClassCastException is thrown.
  
  @param object  Day object to compare to.
  @return @see Comparable#compareTo(Object)
  @throws IllegalArgumentException  If day is null.