mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 01:15:14 +02:00
make date format
supports locale (#6306)
* add --locale flag to make output support locale * implement again based on nu-utils get_system_locale_string * add comment
This commit is contained in:
@ -27,13 +27,13 @@ pub fn get_system_locale() -> Locale {
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
fn get_system_locale_string() -> Option<String> {
|
||||
pub fn get_system_locale_string() -> Option<String> {
|
||||
std::env::var(LOCALE_OVERRIDE_ENV_VAR)
|
||||
.ok()
|
||||
.or_else(sys_locale::get_locale)
|
||||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
fn get_system_locale_string() -> Option<String> {
|
||||
pub fn get_system_locale_string() -> Option<String> {
|
||||
sys_locale::get_locale()
|
||||
}
|
||||
|
Reference in New Issue
Block a user