date parsing slighly more robust