mirror of
https://github.com/nushell/nushell.git
synced 2025-08-11 11:44:37 +02:00
Renamed time units (#2356)
* Changed time units as outlined in issue #2353. Also applied changes to to_str for Unit - not sure if that was what was wanted. * Forgot the tests! * Updated primitive.rs to match changes. * Updated where example to match changes. * And the html test!
This commit is contained in:
@ -302,19 +302,19 @@ pub fn format_duration(duration: &BigInt) -> String {
|
||||
let mut output_prep = vec![];
|
||||
|
||||
if !days.is_zero() {
|
||||
output_prep.push(format!("{}d", days));
|
||||
output_prep.push(format!("{}day", days));
|
||||
}
|
||||
|
||||
if !hours.is_zero() {
|
||||
output_prep.push(format!("{}h", hours));
|
||||
output_prep.push(format!("{}hr", hours));
|
||||
}
|
||||
|
||||
if !mins.is_zero() {
|
||||
output_prep.push(format!("{}m", mins));
|
||||
output_prep.push(format!("{}min", mins));
|
||||
}
|
||||
|
||||
if !secs.is_zero() {
|
||||
output_prep.push(format!("{}s", secs));
|
||||
output_prep.push(format!("{}sec", secs));
|
||||
}
|
||||
|
||||
if !millis.is_zero() {
|
||||
|
Reference in New Issue
Block a user