Improved parse_date