src/main/java/seedu/taskmanager/model/task/Task.java
/**
     * Checks if the duration of the readOnlyTask is between the start date/time
     * and end date/time of this task
     *
     * @return true if task is a Floating Task
     */
Checks if the duration of the readOnlyTask is between the start date/time
and end date/time of this task

@return true if task is a Floating Task
Checks if the duration of the readOnlyTask is between the start date / time and end date / time of this task @return true if task is a Floating Task
@Override
    public boolean isWithinStartEndDuration(ReadOnlyTask t) {
        if (this.getStartDate().equals(t.getStartDate()) && this.getEndDate().equals(t.getEndDate())) {
            if ((DateTimeUtil.isDateWithin(this.getStartDate().value, t.getStartDate().value,
                    t.getEndDate().value) == 2)) {
                if ((this.getStartTime().laterThanOrEqual(t.getEndTime()))
                        || (t.getStartTime().laterThanOrEqual(this.getEndTime()))) {
                    return false;
                }
                return true;
            } else {
                return true;
            }
        } else if ((this.getEndDate().value).equals(t.getStartDate().value)) {
            if (t.getStartTime().laterThanOrEqual(this.getEndTime())) {
                return false;
            } else {
                return true;
            }
        } else if ((this.getStartDate().value).equals(t.getEndDate().value)) {
            if (this.getStartTime().laterThanOrEqual(t.getEndTime())) {
                return false;
            } else {
                return true;
            }
        } else if ((DateTimeUtil.isDateWithin(this.getStartDate().value, t.getStartDate().value,
                t.getEndDate().value) == 1)
                || (DateTimeUtil.isDateWithin(this.getEndDate().value, t.getStartDate().value,
                        t.getEndDate().value) == 1)
                || (DateTimeUtil.isDateWithin(t.getStartDate().value, this.getStartDate().value,
                        this.getEndDate().value) == 1)
                || (DateTimeUtil.isDateWithin(t.getEndDate().value, this.getStartDate().value,
                        this.getEndDate().value) == 1)) {
            return true;
        } else if ((DateTimeUtil.isDateWithin(this.getStartDate().value, t.getStartDate().value,
                t.getEndDate().value) == 2) && t.getEndTime().laterThanOrEqual(this.getStartTime())) {
            return true;
        } else if ((DateTimeUtil.isDateWithin(this.getEndDate().value, t.getStartDate().value,
                t.getEndDate().value) == 2) && this.getEndTime().laterThanOrEqual(t.getStartTime())) {
            return true;
        }
        return false;
    }
@ Override public boolean isWithinStartEndDuration ( ReadOnlyTask t ) { if ( this . getStartDate ( ) . equals ( t . getStartDate ( ) ) && this . getEndDate ( ) . equals ( t . getEndDate ( ) ) ) { if ( ( DateTimeUtil . isDateWithin ( this . getStartDate ( ) . value , t . getStartDate ( ) . value , t . getEndDate ( ) . value ) == 2 ) ) { if ( ( this . getStartTime ( ) . laterThanOrEqual ( t . getEndTime ( ) ) ) || ( t . getStartTime ( ) . laterThanOrEqual ( this . getEndTime ( ) ) ) ) { return false ; } return true ; } else { return true ; } } else if ( ( this . getEndDate ( ) . value ) . equals ( t . getStartDate ( ) . value ) ) { if ( t . getStartTime ( ) . laterThanOrEqual ( this . getEndTime ( ) ) ) { return false ; } else { return true ; } } else if ( ( this . getStartDate ( ) . value ) . equals ( t . getEndDate ( ) . value ) ) { if ( this . getStartTime ( ) . laterThanOrEqual ( t . getEndTime ( ) ) ) { return false ; } else { return true ; } } else if ( ( DateTimeUtil . isDateWithin ( this . getStartDate ( ) . value , t . getStartDate ( ) . value , t . getEndDate ( ) . value ) == 1 ) || ( DateTimeUtil . isDateWithin ( this . getEndDate ( ) . value , t . getStartDate ( ) . value , t . getEndDate ( ) . value ) == 1 ) || ( DateTimeUtil . isDateWithin ( t . getStartDate ( ) . value , this . getStartDate ( ) . value , this . getEndDate ( ) . value ) == 1 ) || ( DateTimeUtil . isDateWithin ( t . getEndDate ( ) . value , this . getStartDate ( ) . value , this . getEndDate ( ) . value ) == 1 ) ) { return true ; } else if ( ( DateTimeUtil . isDateWithin ( this . getStartDate ( ) . value , t . getStartDate ( ) . value , t . getEndDate ( ) . value ) == 2 ) && t . getEndTime ( ) . laterThanOrEqual ( this . getStartTime ( ) ) ) { return true ; } else if ( ( DateTimeUtil . isDateWithin ( this . getEndDate ( ) . value , t . getStartDate ( ) . value , t . getEndDate ( ) . value ) == 2 ) && this . getEndTime ( ) . laterThanOrEqual ( t . getStartTime ( ) ) ) { return true ; } return false ; }
Checks if the duration of the readOnlyTask is between the start date/time
 and end date/time of this task
Checks if the duration of the readOnlyTask is between the start date / time and end date / time of this task