oven-sh/bun

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

Open

#8,480 opened on 2024年1月25日

GitHub で見る
 (7 comments) (9 reactions) (1 assignee)Rust (4,486 forks)batch import
bugconfirmed buggood first issue

Repository metrics

Stars
 (90,348 stars)
PR merge metrics
 (平均マージ 1d 17h) (30d で 357 merged PRs)

説明

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

コントリビューターガイド