Skip to content

Commit 5cf9b90

Browse files
committed
Correct date now to show how to get RFC3339 output.
FIXES: nushell/nushell#15168
1 parent b551f96 commit 5cf9b90

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

commands/docs/date_now.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ Get the current date and display it in a given format string.
3535
3636
```
3737

38+
Get current time in full RFC 3339 format with time zone.
39+
```nu
40+
> date now | format date %+
41+
42+
```
43+
3844
Get the time duration since 2019-04-30.
3945
```nu
4046
> (date now) - 2019-05-01
@@ -47,8 +53,8 @@ Get the time duration since a more specific time.
4753
4854
```
4955

50-
Get current time in full RFC 3339 format with time zone.
56+
Get current time in RFC 2289 format with time zone.
5157
```nu
52-
> date now | debug
58+
> date now | format date
5359
5460
```

commands/docs/format_date.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,14 @@ Format a given date using a given format string.
6868
> "2021-10-22 20:00:12 +01:00" | format date "%Y-%m-%d"
6969
2021-10-22
7070
```
71+
72+
Format a given date-time using RFC3339 format.
73+
```nu
74+
> "2021-10-22 20:00:12 +01:00" | format date %+
75+
2021-10-22T20:00:12+01:00
76+
```
77+
78+
Format current date-time using RFC3339 format.
79+
```nu
80+
> date now | format date %+
81+
```

0 commit comments

Comments
 (0)