Fix date comparinon in task model.