def relative_time_in_days(end_date, start_date):
    """
    Returns the difference between dates in day unit.
    """
    try:
        difference = (end_date - start_date).days
    except ValueError:
        difference = 0
    return difference