[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#115833: [PATCH] date: document that %k and %l are space padded

From: Jim Meyering
Subject: Re: Bug#115833: [PATCH] date: document that %k and %l are space padded
Date: Thu, 07 Jul 2011 11:01:06 +0200

Benoît Knecht wrote:
> The help output and man page mention that "by default, date pads numeric
> fields with zeroes," yet the description of %k and %l didn't specify
> that these values were space padded, whereas the description of %e did.
> Fixes <>.
> ---
> Hi,
> If anyone is still interested in fixing this bug, here's a trivial patch
> that amends the documentation of date accordingly. Otherwise, feel free
> to close this bug as won't fix.

Thanks for the patch.
I've turned that into something I can use upstream.
If you send more patches, please follow this model (note the form of
the commit log and credit the reporter in the log and add mention in; details in HACKING).

>From 4d6f5ba0477c086fb3258d8bfc638393a16087ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Knecht?= <address@hidden>
Date: Thu, 7 Jul 2011 10:55:47 +0200
Subject: [PATCH] date: note %k and %l are space-padded and equivalent to %_H
 and %_I

* src/date.c (usage): As above, for --help.
* doc/coreutils.texi (Time conversion specifiers): Likewise.
Reported by Britton Leo Kerin in
---          |    1 +
 doc/coreutils.texi |    4 ++--
 src/date.c         |    4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/ b/
index 2979d52..87c5b19 100644
--- a/
+++ b/
@@ -92,6 +92,7 @@ Brian Kimball                       address@hidden
 Brian M. Carlson                    address@hidden
 Brian Silverman                     address@hidden
 Brian Youmans                       address@hidden
+Britton Leo Kerin                   address@hidden
 Bruce Robertson                     address@hidden
 Carl Johnson                        address@hidden
 Carl Lowenstein                     address@hidden
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index c59af2f..11ac7fd 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -13921,10 +13921,10 @@ Time conversion specifiers
 @item %I
 hour (@address@hidden@samp{12})
 @item %k
-hour (@samp{ address@hidden@samp{23}).
+hour, space padded (@samp{ address@hidden@samp{23}); equivalent to @samp{%_H}.
 This is a @acronym{GNU} extension.
 @item %l
-hour (@samp{ address@hidden@samp{12}).
+hour, space padded (@samp{ address@hidden@samp{12}); equivalent to @samp{%_I}.
 This is a @acronym{GNU} extension.
 @item %M
 minute (@address@hidden@samp{59})
diff --git a/src/date.c b/src/date.c
index 6439d16..755736a 100644
--- a/src/date.c
+++ b/src/date.c
@@ -179,8 +179,8 @@ FORMAT controls the output.  Interpreted sequences are:\n\
   %j   day of year (001..366)\n\
 "), stdout);
       fputs (_("\
-  %k   hour ( 0..23)\n\
-  %l   hour ( 1..12)\n\
+  %k   hour, space padded ( 0..23); same as %_H\n\
+  %l   hour, space padded ( 1..12); same as %_I\n\
   %m   month (01..12)\n\
   %M   minute (00..59)\n\
 "), stdout);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]