def compute_time_overlap(appointment1, appointment2):
    """
    Compare two appointments on the same day
    """
    assert appointment1.date_ == appointment2.date_
    print('Checking for time overlap on "{}"...'.format(appointment1.date_))
    print('Times to check: {}, {}'.format(appointment1.time_range_,
        appointment2.time_range_))
    latest_start = max(appointment1.start_time_, appointment2.start_time_)
    earliest_end = min(appointment1.end_time_, appointment2.end_time_)
    delta = (earliest_end - latest_start).seconds
    overlap = max(0, delta)
    if overlap == 0:
        print('No time overlap.')
        return False
    print('\x1b[93mFound time overlap.\x1b[0m')
    return True
