doc: improve date -I doc

Suggested by Marc Chantreux (bug#59827).
* doc/coreutils.texi (Options for date):
Give formats for -I, like we already do for --rfc-3339.
This commit is contained in:
Paul Eggert committed 2022-12-05 18:42:34 -08:00
1 parent 02441761c9
commit 5399f2aac4
1 file changed
+12 -9
+12 -9
View File
@@ -16559,22 +16559,25 @@ terms of the time to include. It can be one of the following:
@table @samp
@item auto
Print just the date. This is the default if @var{timespec} is omitted.
This is like the format @code{%Y-%m-%d}.
@item hours
Append the hour of the day to the date.
Also print hours and timezone.
This is like the format @code{%Y-%m-%dT%H%:z}.
@item minutes
Append the hours and minutes.
Also print minutes.
This is like the format @code{%Y-%m-%dT%H:%M%:z}.
@item seconds
Append the hours, minutes and seconds.
Also print seconds.
This is like the format @code{%Y-%m-%dT%H:%M:%S%:z}.
@item ns
Append the hours, minutes, seconds and nanoseconds.
Also print nanoseconds.
This is like the format @code{%Y-%m-%dT%H:%M:%S,%N%:z}.
@end table
If showing any time terms, then include the time zone using the format
@samp{%:z}.
@macro dateParseNote
This format is always suitable as input
for the @option{--date} (@option{-d}) and @option{--file}
@@ -16640,19 +16643,19 @@ It can be one of the following:
@table @samp
@item date
Print just the full-date, e.g., @samp{2020-07-21}.
This is equivalent to the format @samp{%Y-%m-%d}.
This is like the format @samp{%Y-%m-%d}.
@item seconds
Print the full-date and full-time separated by a space, e.g.,
@samp{2020-07-21 04:30:37+05:30}. The output ends with a numeric
time-offset; here the @samp{+05:30} means that local time is five
hours and thirty minutes east of UTC@. This is equivalent to
hours and thirty minutes east of UTC@. This is like
the format @samp{%Y-%m-%d %H:%M:%S%:z}.
@item ns
Like @samp{seconds}, but also print nanoseconds, e.g.,
@samp{2020-07-21 04:30:37.998458565+05:30}.
This is equivalent to the format @samp{%Y-%m-%d %H:%M:%S.%N%:z}.
This is like the format @samp{%Y-%m-%d %H:%M:%S.%N%:z}.
@end table