some tweeking in date parsing and formatting