1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-18 07:04:48 +02:00

Cal documentation updates ()

This commit is contained in:
Joseph T. Lyons
2020-05-26 07:21:36 -04:00
committed by GitHub
parent bf212a5a3a
commit a915471b38
2 changed files with 17 additions and 18 deletions
crates/nu-cli/tests/commands
docs/commands

@ -33,7 +33,7 @@ fn cal_friday_the_thirteenths_in_2015() {
let actual = nu!( let actual = nu!(
cwd: ".", pipeline( cwd: ".", pipeline(
r#" r#"
cal --full-year 2015 | get friday | compact | where $it == 13 | count cal --full-year 2015 | default friday 0 | where friday == 13 | count
"# "#
)); ));

@ -14,23 +14,23 @@ Use `cal` to display a calendar.
```shell ```shell
> cal > cal
───┬────────┬────────┬─────────┬───────────┬────────-─┬────────┬────────── ───┬────────┬────────┬─────────┬───────────┬─────────┬────────┬──────────
# │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday # │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday
───┼────────┼────────┼─────────┼───────────┼──────-───┼────────┼────────── ───┼────────┼────────┼─────────┼───────────┼─────────┼────────┼──────────
0 │ │ │ │ │ │ 12 0 │ │ │ │ │ │ 12
13456789 13456789
210111213141516 210111213141516
317181920212223 317181920212223
424252627282930 424252627282930
531 │ │ │ │ │ │ 531 │ │ │ │ │ │
───┴────────┴────────┴─────────┴───────────┴────-─────┴────────┴────────── ───┴────────┴────────┴─────────┴───────────┴─────────┴────────┴──────────
``` ```
```shell ```shell
> cal -yqm --full-year 2020 > cal -yqm --full-year 2020
────┬──────┬─────────┬───────┬────────┬────────┬─────────┬───────────┬───-──────┬────────┬────────── ────┬──────┬─────────┬───────┬────────┬────────┬─────────┬───────────┬─────────┬────────┬──────────
# │ year │ quarter │ month │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday # │ year │ quarter │ month │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday
────┼──────┼─────────┼───────┼────────┼────────┼─────────┼───────────┼────-─────┼────────┼────────── ────┼──────┼─────────┼───────┼────────┼────────┼─────────┼───────────┼─────────┼────────┼──────────
0202011 │ │ │ │ 1234 0202011 │ │ │ │ 1234
1202011567891011 1202011567891011
220201112131415161718 220201112131415161718
@ -93,14 +93,14 @@ Use `cal` to display a calendar.
59202041213141516171819 59202041213141516171819
60202041220212223242526 60202041220212223242526
6120204122728293031 │ │ 6120204122728293031 │ │
────┴──────┴─────────┴───────┴────────┴────────┴─────────┴───────────┴─-────────┴────────┴────────── ────┴──────┴─────────┴───────┴────────┴────────┴─────────┴───────────┴─────────┴────────┴──────────
``` ```
```shell ```shell
> cal -yqm --full-year 2020 --month-names > cal -yqm --full-year 2020 --month-names
────┬──────┬─────────┬───────────┬────────┬────────┬─────────┬───────────┬──-───────┬────────┬────────── ────┬──────┬─────────┬───────────┬────────┬────────┬─────────┬───────────┬─────────┬────────┬──────────
# │ year │ quarter │ month │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday # │ year │ quarter │ month │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday
────┼──────┼─────────┼───────────┼────────┼────────┼─────────┼───────────┼─-────────┼────────┼────────── ────┼──────┼─────────┼───────────┼────────┼────────┼─────────┼───────────┼─────────┼────────┼──────────
020201 │ january │ │ │ │ 1234 020201 │ january │ │ │ │ 1234
120201 │ january │ 567891011 120201 │ january │ 567891011
220201 │ january │ 12131415161718 220201 │ january │ 12131415161718
@ -163,29 +163,28 @@ Use `cal` to display a calendar.
5920204 │ december │ 13141516171819 5920204 │ december │ 13141516171819
6020204 │ december │ 20212223242526 6020204 │ december │ 20212223242526
6120204 │ december │ 2728293031 │ │ 6120204 │ december │ 2728293031 │ │
────┴──────┴─────────┴───────────┴────────┴────────┴─────────┴───────────┴─-────────┴────────┴────────── ────┴──────┴─────────┴───────────┴────────┴────────┴─────────┴───────────┴─────────┴────────┴──────────
``` ```
```shell ```shell
> cal -ym --full-year 2303 --month-names | where month == "june" > cal -ym --full-year 2303 --month-names | where month == "june"
───┬──────┬───────┬────────┬────────┬─────────┬───────────┬─────-────┬────────┬────────── ───┬──────┬───────┬────────┬────────┬─────────┬───────────┬─────────┬────────┬──────────
# │ year │ month │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday # │ year │ month │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday
───┼──────┼───────┼────────┼────────┼─────────┼───────────┼────-─────┼────────┼────────── ───┼──────┼───────┼────────┼────────┼─────────┼───────────┼─────────┼────────┼──────────
02303 │ june │ │ 123456 02303 │ june │ │ 123456
12303 │ june │ 78910111213 12303 │ june │ 78910111213
22303 │ june │ 14151617181920 22303 │ june │ 14151617181920
32303 │ june │ 21222324252627 32303 │ june │ 21222324252627
42303 │ june │ 282930 │ │ │ │ 42303 │ june │ 282930 │ │ │ │
───┴──────┴───────┴────────┴────────┴─────────┴───────────┴──────-───┴────────┴────────── ───┴──────┴───────┴────────┴────────┴─────────┴───────────┴─────────┴────────┴──────────
``` ```
```shell ```shell
> cal -my --full-year 2020 --month-names | where friday == 13 > cal -my --full-year 2020 --month-names | default friday 0 | where friday == 13
───┬──────┬──────────┬────────┬────────┬─────────┬───────────┬────-─────┬────────┬────────── ───┬──────┬──────────┬────────┬────────┬─────────┬───────────┬─────────┬────────┬──────────
# │ year │ month │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday # │ year │ month │ sunday │ monday │ tuesday │ wednesday │ thursday │ friday │ saturday
───┼──────┼──────────┼────────┼────────┼─────────┼───────────┼──-───────┼────────┼────────── ───┼──────┼──────────┼────────┼────────┼─────────┼───────────┼─────────┼────────┼──────────
02020 │ march │ 891011121314 02020 │ march │ 891011121314
12020 │ november │ 891011121314 12020 │ november │ 891011121314
───┴──────┴──────────┴────────┴────────┴─────────┴───────────┴────-─────┴────────┴────────── ───┴──────┴──────────┴────────┴────────┴─────────┴───────────┴─────────┴────────┴──────────
``` ```