dateparser refactored