question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What about default locale?

See original GitHub issue

Is here ways for change default locale for tests?

I ask about emulations window.navigator.language or something like this. For example toLocaleString or toLocaleDateString using as default browser locale

var date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
console.log(date.toLocaleTimeString());

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
BrunoQuaresmacommented, Jan 23, 2017

@domenic override the language property not works for toLocale methods.

1reaction
BrunoQuaresmacommented, Jan 24, 2017

@domenic I’m using this code.: date.toLocaleDateString('pt-BR')

In my chrome browser the result is.: 9/13/2016 When I run the tests in local.: 2016-09-13 When I runt the tests in Circle CI.: 9/13/2016

Do you have any ideia why it happens?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The default locale - IBM
The default locale specifies the following information: The U.S. English language and an English-language code set; Standard U.S. formats for monetary, numeric, ...
Read more >
What Is a Locale? - International Language Environment Guide
A locale consists of a number of categories for which country-dependent formatting or other specifications exist. A program's locale defines its code sets,...
Read more >
About default locales - D2L
About default locales. Setting the default locale within the Manage Locales tool determines the default locale for the entire organization.
Read more >
The Default Locale - Documentation - Perforce Software
The current default locale is set at startup time to some system-specific value. On Windows, for example, the system default locale is set...
Read more >
How do I set the default locale in the JVM? - Stack Overflow
The default locale of your application is determined in three ways. First, unless you have explicitly changed the default, the Locale.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found