set conditions on date field to calculate delivery date