Change date parsing logic