Refatored to add dateFormat property