oven-sh/bun

Default locale for`Intl.DateTimeFormat` should match `$LANG` environment variable

Open

#8.480 aberto em 25 de jan. de 2024

Ver no GitHub
 (7 comments) (9 reactions) (1 assignee)Rust (4.486 forks)batch import
bugconfirmed buggood first issue

Métricas do repositório

Stars
 (90.348 stars)
Métricas de merge de PR
 (Mesclagem média 1d 17h) (357 fundiu PRs em 30d)

Description

What version of Bun is running?

1.0.25+a8ff7be64

What platform is your computer?

Darwin 23.3.0 arm64 arm

What steps can reproduce the bug?

> bun repl
> Intl.DateTimeFormat().resolvedOptions().locale
'en-US'

What is the expected behavior?

In node, deno and browsers, it is always the user's language preference. In my case it's zh-CN, which corresponds to the value obtained by running echo $LANG in the terminal.

What do you see instead?

Always en-US

Additional information

No response

Guia do colaborador