Use browser locale to determine whether DD and MM needs to be swapped in normalize_date function

Remove loop logic from previous commit.