more robust date parser