mirror of
https://github.com/nushell/nushell.git
synced 2025-05-01 00:24:29 +02:00
Cal documentation updates (#1895)
This commit is contained in:
parent
bf212a5a3a
commit
a915471b38
@ -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 │ │ │ │ │ │ 1 │ 2
|
0 │ │ │ │ │ │ 1 │ 2
|
||||||
1 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9
|
1 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9
|
||||||
2 │ 10 │ 11 │ 12 │ 13 │ 14 │ 15 │ 16
|
2 │ 10 │ 11 │ 12 │ 13 │ 14 │ 15 │ 16
|
||||||
3 │ 17 │ 18 │ 19 │ 20 │ 21 │ 22 │ 23
|
3 │ 17 │ 18 │ 19 │ 20 │ 21 │ 22 │ 23
|
||||||
4 │ 24 │ 25 │ 26 │ 27 │ 28 │ 29 │ 30
|
4 │ 24 │ 25 │ 26 │ 27 │ 28 │ 29 │ 30
|
||||||
5 │ 31 │ │ │ │ │ │
|
5 │ 31 │ │ │ │ │ │
|
||||||
───┴────────┴────────┴─────────┴───────────┴────-─────┴────────┴──────────
|
───┴────────┴────────┴─────────┴───────────┴──────────┴────────┴──────────
|
||||||
```
|
```
|
||||||
|
|
||||||
```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
|
||||||
────┼──────┼─────────┼───────┼────────┼────────┼─────────┼───────────┼────-─────┼────────┼──────────
|
────┼──────┼─────────┼───────┼────────┼────────┼─────────┼───────────┼──────────┼────────┼──────────
|
||||||
0 │ 2020 │ 1 │ 1 │ │ │ │ 1 │ 2 │ 3 │ 4
|
0 │ 2020 │ 1 │ 1 │ │ │ │ 1 │ 2 │ 3 │ 4
|
||||||
1 │ 2020 │ 1 │ 1 │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │ 11
|
1 │ 2020 │ 1 │ 1 │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │ 11
|
||||||
2 │ 2020 │ 1 │ 1 │ 12 │ 13 │ 14 │ 15 │ 16 │ 17 │ 18
|
2 │ 2020 │ 1 │ 1 │ 12 │ 13 │ 14 │ 15 │ 16 │ 17 │ 18
|
||||||
@ -93,14 +93,14 @@ Use `cal` to display a calendar.
|
|||||||
59 │ 2020 │ 4 │ 12 │ 13 │ 14 │ 15 │ 16 │ 17 │ 18 │ 19
|
59 │ 2020 │ 4 │ 12 │ 13 │ 14 │ 15 │ 16 │ 17 │ 18 │ 19
|
||||||
60 │ 2020 │ 4 │ 12 │ 20 │ 21 │ 22 │ 23 │ 24 │ 25 │ 26
|
60 │ 2020 │ 4 │ 12 │ 20 │ 21 │ 22 │ 23 │ 24 │ 25 │ 26
|
||||||
61 │ 2020 │ 4 │ 12 │ 27 │ 28 │ 29 │ 30 │ 31 │ │
|
61 │ 2020 │ 4 │ 12 │ 27 │ 28 │ 29 │ 30 │ 31 │ │
|
||||||
────┴──────┴─────────┴───────┴────────┴────────┴─────────┴───────────┴─-────────┴────────┴──────────
|
────┴──────┴─────────┴───────┴────────┴────────┴─────────┴───────────┴──────────┴────────┴──────────
|
||||||
```
|
```
|
||||||
|
|
||||||
```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
|
||||||
────┼──────┼─────────┼───────────┼────────┼────────┼─────────┼───────────┼─-────────┼────────┼──────────
|
────┼──────┼─────────┼───────────┼────────┼────────┼─────────┼───────────┼──────────┼────────┼──────────
|
||||||
0 │ 2020 │ 1 │ january │ │ │ │ 1 │ 2 │ 3 │ 4
|
0 │ 2020 │ 1 │ january │ │ │ │ 1 │ 2 │ 3 │ 4
|
||||||
1 │ 2020 │ 1 │ january │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │ 11
|
1 │ 2020 │ 1 │ january │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │ 11
|
||||||
2 │ 2020 │ 1 │ january │ 12 │ 13 │ 14 │ 15 │ 16 │ 17 │ 18
|
2 │ 2020 │ 1 │ january │ 12 │ 13 │ 14 │ 15 │ 16 │ 17 │ 18
|
||||||
@ -163,29 +163,28 @@ Use `cal` to display a calendar.
|
|||||||
59 │ 2020 │ 4 │ december │ 13 │ 14 │ 15 │ 16 │ 17 │ 18 │ 19
|
59 │ 2020 │ 4 │ december │ 13 │ 14 │ 15 │ 16 │ 17 │ 18 │ 19
|
||||||
60 │ 2020 │ 4 │ december │ 20 │ 21 │ 22 │ 23 │ 24 │ 25 │ 26
|
60 │ 2020 │ 4 │ december │ 20 │ 21 │ 22 │ 23 │ 24 │ 25 │ 26
|
||||||
61 │ 2020 │ 4 │ december │ 27 │ 28 │ 29 │ 30 │ 31 │ │
|
61 │ 2020 │ 4 │ december │ 27 │ 28 │ 29 │ 30 │ 31 │ │
|
||||||
────┴──────┴─────────┴───────────┴────────┴────────┴─────────┴───────────┴─-────────┴────────┴──────────
|
────┴──────┴─────────┴───────────┴────────┴────────┴─────────┴───────────┴──────────┴────────┴──────────
|
||||||
```
|
```
|
||||||
|
|
||||||
```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
|
||||||
───┼──────┼───────┼────────┼────────┼─────────┼───────────┼────-─────┼────────┼──────────
|
───┼──────┼───────┼────────┼────────┼─────────┼───────────┼──────────┼────────┼──────────
|
||||||
0 │ 2303 │ june │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6
|
0 │ 2303 │ june │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6
|
||||||
1 │ 2303 │ june │ 7 │ 8 │ 9 │ 10 │ 11 │ 12 │ 13
|
1 │ 2303 │ june │ 7 │ 8 │ 9 │ 10 │ 11 │ 12 │ 13
|
||||||
2 │ 2303 │ june │ 14 │ 15 │ 16 │ 17 │ 18 │ 19 │ 20
|
2 │ 2303 │ june │ 14 │ 15 │ 16 │ 17 │ 18 │ 19 │ 20
|
||||||
3 │ 2303 │ june │ 21 │ 22 │ 23 │ 24 │ 25 │ 26 │ 27
|
3 │ 2303 │ june │ 21 │ 22 │ 23 │ 24 │ 25 │ 26 │ 27
|
||||||
4 │ 2303 │ june │ 28 │ 29 │ 30 │ │ │ │
|
4 │ 2303 │ june │ 28 │ 29 │ 30 │ │ │ │
|
||||||
───┴──────┴───────┴────────┴────────┴─────────┴───────────┴──────-───┴────────┴──────────
|
───┴──────┴───────┴────────┴────────┴─────────┴───────────┴──────────┴────────┴──────────
|
||||||
```
|
```
|
||||||
|
|
||||||
```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
|
||||||
───┼──────┼──────────┼────────┼────────┼─────────┼───────────┼──-───────┼────────┼──────────
|
───┼──────┼──────────┼────────┼────────┼─────────┼───────────┼──────────┼────────┼──────────
|
||||||
0 │ 2020 │ march │ 8 │ 9 │ 10 │ 11 │ 12 │ 13 │ 14
|
0 │ 2020 │ march │ 8 │ 9 │ 10 │ 11 │ 12 │ 13 │ 14
|
||||||
1 │ 2020 │ november │ 8 │ 9 │ 10 │ 11 │ 12 │ 13 │ 14
|
1 │ 2020 │ november │ 8 │ 9 │ 10 │ 11 │ 12 │ 13 │ 14
|
||||||
───┴──────┴──────────┴────────┴────────┴─────────┴───────────┴────-─────┴────────┴──────────
|
───┴──────┴──────────┴────────┴────────┴─────────┴───────────┴──────────┴────────┴──────────
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user