fix date parsing implementation