mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 02:24:58 +02:00
rename from date format
to format date
(#9902)
# Description Closes: #9891 I also think it's good to keep command name consistency. And moving `date format` to deprecated. # User-Facing Changes Running `date format` will lead to deprecate message: ```nushell ❯ "2021-10-22 20:00:12 +01:00" | date format Error: nu:🐚:deprecated_command × Deprecated command date format ╭─[entry #28:1:1] 1 │ "2021-10-22 20:00:12 +01:00" | date format · ─────┬───── · ╰── 'date format' is deprecated. Please use 'format date' instead. ╰──── ```
This commit is contained in:
@ -32,14 +32,14 @@ fn number_float() -> TestResult {
|
||||
|
||||
#[test]
|
||||
fn date_minus_duration() -> TestResult {
|
||||
let input = "2023-04-22 - 2day | date format %Y-%m-%d";
|
||||
let input = "2023-04-22 - 2day | format date %Y-%m-%d";
|
||||
let expected = "2023-04-20";
|
||||
run_test(input, expected)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn date_plus_duration() -> TestResult {
|
||||
let input = "2023-04-18 + 2day | date format %Y-%m-%d";
|
||||
let input = "2023-04-18 + 2day | format date %Y-%m-%d";
|
||||
let expected = "2023-04-20";
|
||||
run_test(input, expected)
|
||||
}
|
||||
|
Reference in New Issue
Block a user