fixed bug where labelFormat was being used to calculate dates instead of dateFormat