Fix bug about date parsing