Home

Bug: Intl.DateTimeFormat always uses en-US culture

%3CLINGO-SUB%20id%3D%22lingo-sub-709751%22%20slang%3D%22en-US%22%3EBug%3A%20Intl.DateTimeFormat%20always%20uses%20en-US%20culture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-709751%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20Intl.DateTimeFormat%20API%20does%20not%20respect%20the%20selected%20language%20of%20the%20user.%20It%20always%20formats%20dates%20according%20to%20the%20en-US%20culture.%20In%20Chrome%20and%20Opera%2C%20it%20formats%20dates%20according%20to%20the%20language%20of%20the%20user.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-777765%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20Intl.DateTimeFormat%20always%20uses%20en-US%20culture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-777765%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F363627%22%20target%3D%22_blank%22%3E%40tommyc%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAre%20your%20Regional%20settings%20set%20correctly%20on%20the%20computer%3F%20Also%2C%20is%20this%20issue%20still%20present%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGabriel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-777816%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20Intl.DateTimeFormat%20always%20uses%20en-US%20culture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-777816%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F363627%22%20target%3D%22_blank%22%3E%40tommyc%3C%2FA%3E%2C%20I%20would%20really%20like%20to%20understand%20more%20about%20this%20issue.%26nbsp%3B%20We%20have%20a%20lot%20of%20different%20language%20settings%2C%20and%20they%20tend%20to%20interact%20in%20some%20interesting%20ways.%26nbsp%3B%20Can%20you%20please%20tell%20me%20what%20your%20browser%20language%20settings%20are%3F%3C%2FP%3E%0A%3CP%3EWhat%20is%20the%20display%20language%3F%3C%2FP%3E%0A%3CP%3EWhat%20language%20is%20at%20the%20top%20of%20your%20language%20list%3F%3C%2FP%3E%0A%3CP%3EWhat%20Insider%20channel%20and%20version%20are%20you%20using%3F%3C%2FP%3E%0A%3CP%3EWhat%20is%20your%20language%20set%20to%20on%20you%20operating%20system%3F%3C%2FP%3E%0A%3CP%3EWhat%20operating%20system%20and%20version%20are%20you%20using%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20answering%20these%20questions%2C%20the%20answer%20will%20help%20us%20greatly%20in%20understanding%20what%20is%20going%20on%2C%20and%20will%20allow%20us%20to%20address%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%2C%3C%2FP%3E%0A%3CP%3EElliot%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-799536%22%20slang%3D%22en-US%22%3ERe%3A%20Bug%3A%20Intl.DateTimeFormat%20always%20uses%20en-US%20culture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-799536%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239638%22%20target%3D%22_blank%22%3E%40Elliot%20Kirk%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20OS%20is%20Windows%2010%20version%201903%20build%2018362.239.%3C%2FP%3E%3CP%3EThe%20region%20of%20the%20OS%20is%20set%20to%20Belgium%2C%20the%20language%20is%20Dutch%20(Belgium).%3C%2FP%3E%3CP%3EI'm%20currently%20using%20Edge%20Dev%20version%2077.0.235.5%2C%20display%20language%20is%20English.%20The%20following%20languages%20are%20configured%20in%20Settings%3A%3C%2FP%3E%3COL%3E%3CLI%3EDutch%3C%2FLI%3E%3CLI%3EEnglish%20(United%20States)%3C%2FLI%3E%3CLI%3EEnglish%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CSPAN%3EIn%20the%20JavaScript%20console%2C%20I%20get%20the%20following%20behavior%3A%3C%2FSPAN%3E%3C%2FP%3E%3CTABLE%20border%3D%221%22%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CU%3EJavaScript%20expression%3C%2FU%3E%3C%2FTD%3E%3CTD%3E%3CU%3EEdge%3C%2FU%3E%3C%2FTD%3E%3CTD%3E%3CU%3EOpera%2FChrome%3C%2FU%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3Enavigator.languages%3C%2FTD%3E%3CTD%3E%5B%22nl%22%2C%20%22en-US%22%2C%20%22en%22%5D%3C%2FTD%3E%3CTD%3E%5B%22nl%22%2C%20%22en-US%22%2C%20%22en%22%5D%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3EIntl.DateTimeFormat(%5B%5D).format(new%20Date())%3C%2FTD%3E%3CTD%3E%3CFONT%20color%3D%22%23FF0000%22%3E%228%2F12%2F2019%22%3C%2FFONT%3E%3C%2FTD%3E%3CTD%3E%3CFONT%20color%3D%22%23339966%22%3E%2212-8-2019%22%3C%2FFONT%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E
tommyc
New Contributor

The Intl.DateTimeFormat API does not respect the selected language of the user. It always formats dates according to the en-US culture. In Chrome and Opera, it formats dates according to the language of the user.

3 Replies

@tommyc 

 

Are your Regional settings set correctly on the computer? Also, is this issue still present?

 

Gabriel

Hi @tommyc, I would really like to understand more about this issue.  We have a lot of different language settings, and they tend to interact in some interesting ways.  Can you please tell me what your browser language settings are?

What is the display language?

What language is at the top of your language list?

What Insider channel and version are you using?

What is your language set to on you operating system?

What operating system and version are you using?

 

Thank you for answering these questions, the answer will help us greatly in understanding what is going on, and will allow us to address it.

 

Thanks,

Elliot

@Elliot Kirk 

My OS is Windows 10 version 1903 build 18362.239.

The region of the OS is set to Belgium, the language is Dutch (Belgium).

I'm currently using Edge Dev version 77.0.235.5, display language is English. The following languages are configured in Settings:

  1. Dutch
  2. English (United States)
  3. English

In the JavaScript console, I get the following behavior:

JavaScript expressionEdgeOpera/Chrome
navigator.languages["nl", "en-US", "en"]["nl", "en-US", "en"]
Intl.DateTimeFormat([]).format(new Date())"8/12/2019""12-8-2019"
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies