src/edu/kit/informatik/calendar/DateTime.java
/**
     * Adds a {@linkplain Time} instance to {@link #time}.
     * Calendar rules are respected.
     * @param time The {@linkplain Time} instance to be add
     * @return A new instance of {@linkplain DateTime} with the new values
     */
Adds a  Time instance to  #time.
Calendar rules are respected.
@param time The  Time instance to be add
@return A new instance of  DateTime with the new values
Adds a Time instance to #time . Calendar rules are respected . @param time The Time instance to be add @return A new instance of DateTime with the new values
public DateTime plus(Time time) {
        Time resultTime = this.time.plus(time);
        int dayCarry = 0;
        if (!time.isEqual(Time.MIN_VAL) && !this.time.isEqual(Time.MIN_VAL)) {
            if (!resultTime.isAfter(this.time) && !resultTime.isAfter(time)) {
                dayCarry++;
            }
        }
        return date.plusDays(dayCarry).atTime(resultTime);
    }
public DateTime plus ( Time time ) { Time resultTime = this . time . plus ( time ) ; int dayCarry = 0 ; if ( ! time . isEqual ( Time . MIN_VAL ) && ! this . time . isEqual ( Time . MIN_VAL ) ) { if ( ! resultTime . isAfter ( this . time ) && ! resultTime . isAfter ( time ) ) { dayCarry ++ ; } } return date . plusDays ( dayCarry ) . atTime ( resultTime ) ; }
Adds a {@linkplain Time} instance to {@link #time}.
Adds a { @linkplain Time } instance to { @link #time } .
//true: both the object time and the parameter time aren't 00:00:00 //Only in this case could the addition of 2 times create a day carry //true: the result isn't after the object time or the argument time //This means that the result surpassed 23:59:59, creating a day carry