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:
WindSoilder
2023-08-04 02:06:00 +08:00
committed by GitHub
parent a455e2e5eb
commit 14bf25da14
15 changed files with 551 additions and 496 deletions

View File

@ -29,7 +29,7 @@ def create_right_prompt [] {
let time_segment = ([
(ansi reset)
(ansi magenta)
(date now | date format '%Y/%m/%d %r')
(date now | format date '%Y/%m/%d %r')
] | str join | str replace --all "([/:])" $"(ansi green)${1}(ansi magenta)" |
str replace --all "([AP]M)" $"(ansi magenta_underline)${1}")