fixing date parsing/formatting bug