diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-03-26 00:47:28 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-03-26 08:40:31 +0000 |
commit | bf11fd17a9cdd595fae7dac262a9436b60a1bb8d (patch) | |
tree | c3a4c7f823ae64d95fda20bb2f8f95059a27bfac /src | |
parent | 3b98ee7e99c0e329c512d9033033da09e768830f (diff) | |
download | coreutils-bf11fd17a9cdd595fae7dac262a9436b60a1bb8d.tar.xz |
doc: clarify the date standard output formats
* src/date.c (usage): Use FMT rather than TIMESPEC as the parameter,
since it's simpler to understand and can be better aligned.
Give an example for the --iso-8601 output format.
Adjust the example used for the 3 standard formats to be unambiguous
with respect to day/mon ordering and use of leading zeros in the time.
Reorder the options descriptions slightly, so that the
3 standards options are together.
Indent the multi-line descriptions so that grouping is obvious.
Remove a redundant description of the --rfc-3339 format,
which is obvious in the existing example.
Separate these 3 standards options to their own translatable string
to simplify translation.
Change 'date and time' to 'date/time' in the --iso-8601 description
to be consistent with --rfc-3339 and to help avoid the implication
that the time is always output or even output by default.
Fixes http://bugs.gnu.org/20203
Diffstat (limited to 'src')
-rw-r--r-- | src/date.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/src/date.c b/src/date.c index 65fd0fc5f..eaee8b273 100644 --- a/src/date.c +++ b/src/date.c @@ -132,26 +132,32 @@ Display the current time in the given FORMAT, or set the system date.\n\ emit_mandatory_arg_note (); fputs (_("\ - -d, --date=STRING display time described by STRING, not 'now'\n\ - -f, --file=DATEFILE like --date once for each line of DATEFILE\n\ - -I[TIMESPEC], --iso-8601[=TIMESPEC] output date/time in ISO 8601 format.\n\ - TIMESPEC='date' for date only (the default),\n\ - 'hours', 'minutes', 'seconds', or 'ns' for date\n\ - and time to the indicated precision.\n\ + -d, --date=STRING display time described by STRING, not 'now'\n\ + -f, --file=DATEFILE like --date; once for each line of DATEFILE\n\ "), stdout); fputs (_("\ - -r, --reference=FILE display the last modification time of FILE\n\ - -R, --rfc-2822 output date and time in RFC 2822 format.\n\ - Example: Mon, 07 Aug 2006 12:34:56 -0600\n\ + -I[FMT], --iso-8601[=FMT] output date/time in ISO 8601 format.\n\ + FMT='date' for date only (the default),\n\ + 'hours', 'minutes', 'seconds', or 'ns'\n\ + for date and time to the indicated precision.\n\ + Example: 2006-08-14T02:34:56-0600\n\ "), stdout); fputs (_("\ - --rfc-3339=TIMESPEC output date and time in RFC 3339 format.\n\ - TIMESPEC='date', 'seconds', or 'ns' for\n\ - date and time to the indicated precision.\n\ - Date and time components are separated by\n\ - a single space: 2006-08-07 12:34:56-06:00\n\ - -s, --set=STRING set time described by STRING\n\ - -u, --utc, --universal print or set Coordinated Universal Time (UTC)\n\ + -R, --rfc-2822 output date and time in RFC 2822 format.\n\ + Example: Mon, 14 Aug 2006 02:34:56 -0600\n\ +"), stdout); + fputs (_("\ + --rfc-3339=FMT output date/time in RFC 3339 format.\n\ + FMT='date', 'seconds', or 'ns'\n\ + for date and time to the indicated precision.\n\ + Example: 2006-08-14 02:34:56-06:00\n\ +"), stdout); + fputs (_("\ + -r, --reference=FILE display the last modification time of FILE\n\ +"), stdout); + fputs (_("\ + -s, --set=STRING set time described by STRING\n\ + -u, --utc, --universal print or set Coordinated Universal Time (UTC)\n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); |