More robust date parsing.