Skip to content

Respect $env.LC_ALL and $env.LANG in format date #16369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2025

Conversation

weirdan
Copy link
Contributor

@weirdan weirdan commented Aug 6, 2025

Refs #16368 (comment)

Description

Respect user preference for date/time formats, in a more compatible way. Environment variable order is taken from https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html. Previously, only $env.LC_TIME was consulted to select the locale.

User-Facing Changes

Users will be able to specify the format preference via $env.LANG and override it with $env.LC_ALL.

Tests + Formatting

All pass.

@sholderbach sholderbach added localization Issues relating to i18n and locale for display formats datetime-handling Semantics and implementation of the datetime/duration types and commands labels Aug 6, 2025
Copy link
Contributor

@WindSoilder WindSoilder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@WindSoilder WindSoilder merged commit 3dead9a into nushell:main Aug 8, 2025
16 checks passed
@github-actions github-actions bot added this to the v0.107.0 milestone Aug 8, 2025
@sholderbach sholderbach mentioned this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datetime-handling Semantics and implementation of the datetime/duration types and commands localization Issues relating to i18n and locale for display formats
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants