extract date parser function for general use
pep8