Refactor parse_date() #18