def _get_total_for_date(basket, date_id):
    """ Gets the total quantity in the basket for a given date """
    total = 0
    for type_id in basket[date_id]:
        total += basket[date_id][type_id]

    return total