Re: date --help sends one digging RFCs

2005-03-08 Thread Paul Eggert
Eric Blake [EMAIL PROTECTED] writes:

 2005-02-26  Eric Blake  [EMAIL PROTECTED]

   * coreutils.texi (Padding and other flags): Mention # flag.

Thanks for mentioning the problem.  I went through the source and
documentation with a fine-toothed comb, compared them to what POSIX
specifieds, and installed the following changes.

Not that this addresses the original complaint.  Date's usage strings
should be brief, and I couldn't see any way to explain it the way that
he preferred without becoming either more confusing or too prolix (or
both).

2005-03-08  Paul Eggert  [EMAIL PROTECTED]

* doc/coreutils.texi (date invocation): Use an example that makes it
clear tha the default date use space-padded day of month.
Replace directive with conversion specifier to be consistent
with POSIX.  All uses changed.
Fix menu RHS to match actual directive lists.
(Time conversion specifiers): Renamed from Time directives.
Use @samp consistently, sometimes instead of @code.
Consistently ention which specifiers are GNU extensions.
Give more examples (in some cases, instead of ranges).
Say why %F is preferred for dates.
(Date conversion specifiers): Renamed from Date directives.
Likewise for other changes.
(Padding and other flags): Correct the description.
Document #.  Give an example for %9B.

* src/date.c (usage): Redo to match recent documentation changes.
Don't bother documenting which usages are GNU extensions; the list
wasn't correct, and is better left to the printed manual anyway.

Index: doc/coreutils.texi
===
RCS file: /fetish/cu/doc/coreutils.texi,v
retrieving revision 1.242
diff -p -u -r1.242 coreutils.texi
--- doc/coreutils.texi  24 Feb 2005 00:27:44 -  1.242
+++ doc/coreutils.texi  8 Mar 2005 22:18:55 -
@@ -395,13 +395,13 @@ System context
 
 @command{date}: Print or set system date and time
 
-* Time directives::  Time directives
-* Date directives::  Date directives
-* Literal directives::   Literal directives
-* Padding and other flags::  Padding and other flags
-* Setting the time:: Setting the time
-* Options for date:: Options for @command{date}
-* Examples of date:: Examples of @command{date}
+* Time conversion specifiers::   %[HIklMNpPrRsSTXzZ]
+* Date conversion specifiers::   %[aAbBcCdDeFgGhjmuUVwWxyY]
+* Literal conversion specifiers:: %[%nt]
+* Padding and other flags::  Pad with zeroes, spaces, etc.
+* Setting the time:: Changing the system clock.
+* Options for date:: Instead of the current time.
+* Examples of date:: Examples.
 
 Modified command invocation
 
@@ -11417,7 +11417,7 @@ date [-u|--utc|--universal] @c this avoi
 Invoking @command{date} with no @var{format} argument is equivalent to invoking
 it with a default format that depends on the @env{LC_TIME} locale category.
 In the default C locale, this format is @samp{'+%a %b %e %H:%M:%S %Z %Y'},
-so the output looks like @samp{Fri Feb 27 13:47:51 PST 2004}.
+so the output looks like @samp{Thu Mar @ 3 13:47:51 PST 2005}.
 
 @vindex TZ
 Normally, @command{date} uses the time zone rules indicated by the
@@ -11432,165 +11432,179 @@ If given an argument that starts with a 
 current time and date (or the time and date specified by the
 @option{--date} option, see below) in the format defined by that argument,
 which is similar to that of the @code{strftime} function.  Except for
-directives, which start with @samp{%}, characters in the format string
-are printed unchanged.  The directives are described below.
+conversion specifiers, which start with @samp{%}, characters in the
+format string are printed unchanged.  The conversion specifiers are
+described below.
 
 @exitstatus
 
 @menu
-* Time directives:: %[HIklMprsSTXzZ]
-* Date directives:: %[aAbBcCdDhjmUwWxyY]
-* Literal directives::  %[%nt]
-* Padding and other flags:: Pad with zeroes, spaces (%_), etc.
-* Setting the time::Changing the system clock.
-* Options for date::Instead of the current time.
-* Examples of date::Examples.
+* Time conversion specifiers:: %[HIklMNpPrRsSTXzZ]
+* Date conversion specifiers:: %[aAbBcCdDeFgGhjmuUVwWxyY]
+* Literal conversion specifiers::  %[%nt]
+* Padding and other flags::Pad with zeroes, spaces, etc.
+* Setting the time::   Changing the system clock.
+* Options for date::   Instead of the current time.
+* Examples of date::   Examples.
 @end menu
 
[EMAIL PROTECTED] Time directives
[EMAIL PROTECTED] Time directives
[EMAIL PROTECTED] Time conversion specifiers
[EMAIL PROTECTED] Time conversion specifiers
 
[EMAIL PROTECTED] time directives
[EMAIL PROTECTED] directives, time
[EMAIL PROTECTED] time conversion 

Re: date --help sends one digging RFCs

2005-03-01 Thread Dan Jacobson
Eric Instead of complaining, why not propose a patch?  It doesn't even have to

OK, maybe add an option that would show what all the flags are now, and in
the current locale,
$ date --examples-current
which would give sort of like what
$ set -- $(date --help|
perl -anlwe 'next unless /./;$_=$F[0];s/^%/+%/||s/(^-.),/$1/||next;print')
$ for i do echo  $i;date $i;echo;done
does now.
But also add a plain
$ date --examples
which would give e.g., 11/22/2002 examples, so the user would be sure to see
maximal spaced examples...


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: date --help sends one digging RFCs

2005-02-25 Thread Dan Jacobson
P Consider that most people reading the docs will know the option exists
P and are simply confirming syntax, or won't care.

Well I think --help at least could cut to the chase with actual samples.

P The info(1) documentation explains that the option is equivalent to the
P format string '%a, %d %b %Y %H:%M:%S %z', so whipping out a RFC2822
P printout is not strictly necessary.

even that % stuff requires thinking.  --help is nice and informal
place for the non thinkers.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: date --help sends one digging RFCs

2005-02-24 Thread Philip Rowlands
On Fri, 25 Feb 2005, Dan Jacobson wrote:

man date and date --help have got to be kidding saying things like
   -R, --rfc-2822
  output RFC-2822 compliant date string
whereupon we have to go looking up what RFC-2822 compliant date
strings look like.  Make sure to show what they look like right there.

Consider that most people reading the docs will know the option exists
and are simply confirming syntax, or won't care.

The info(1) documentation explains that the option is equivalent to the
format string '%a, %d %b %Y %H:%M:%S %z', so whipping out a RFC2822
printout is not strictly necessary.


Cheers,
Phil


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils