Possible improvement to date parsing (fragile)