Cal documentation updates (#1895)

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

View File

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

View File

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