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

Tested with both en-CA and en-US locales in Chrome. Tests passed.