challenge 13: robustness fixes for invalid dates