GNU bug report logs - #26260
~f SRFI-19 format specifier mishandles one-digit seconds value

Previous Next

Package: guile;

Reported by: Zefram <zefram <at> fysh.org>

Date: Sun, 26 Mar 2017 02:10:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> igalia.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26260 in the body.
You can then email your comments to 26260 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#26260; Package guile. (Sun, 26 Mar 2017 02:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zefram <zefram <at> fysh.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sun, 26 Mar 2017 02:10:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zefram <zefram <at> fysh.org>
To: bug-guile <at> gnu.org
Subject: ~f SRFI-19 format specifier mishandles one-digit seconds value
Date: Sun, 26 Mar 2017 03:09:29 +0100
The ~f format specifier for SRFI-19's date->string is documented as:

#    ~f     seconds and fractional seconds, with locale
#           decimal point, eg. `5.2'

Let's test that example:

scheme@(guile-user)> (use-modules (srfi srfi-19))
scheme@(guile-user)> (date->string (make-date 200000000 5 34 12 26 3 2017 0) "~f")
$1 = "05.2"

That's not the documented format: the doc and the SRFI itself show "5.2"
with no leading padding, but actual behaviour is to zero pad.  There is
much that is ambiguous in the SRFI's specification of ~f, but with that
example it does at least seem clear that there should be no padding there.

-zefram




Information forwarded to bug-guile <at> gnu.org:
bug#26260; Package guile. (Wed, 19 Apr 2017 13:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 26260 <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> igalia.com>
To: Zefram <zefram <at> fysh.org>
Cc: 26260 <at> debbugs.gnu.org
Subject: Re: bug#26260: ~f SRFI-19 format specifier mishandles one-digit
 seconds value
Date: Wed, 19 Apr 2017 15:44:27 +0200
On Sun 26 Mar 2017 04:09, Zefram <zefram <at> fysh.org> writes:

> The ~f format specifier for SRFI-19's date->string is documented as:
>
> #    ~f     seconds and fractional seconds, with locale
> #           decimal point, eg. `5.2'
>
> Let's test that example:
>
> scheme@(guile-user)> (use-modules (srfi srfi-19))
> scheme@(guile-user)> (date->string (make-date 200000000 5 34 12 26 3 2017 0) "~f")
> $1 = "05.2"
>
> That's not the documented format: the doc and the SRFI itself show "5.2"
> with no leading padding, but actual behaviour is to zero pad.  There is
> much that is ambiguous in the SRFI's specification of ~f, but with that
> example it does at least seem clear that there should be no padding there.

Fixed in git; thanks for the report :)

Andy




Reply sent to Andy Wingo <wingo <at> igalia.com>:
You have taken responsibility. (Wed, 19 Apr 2017 13:48:01 GMT) Full text and rfc822 format available.

Notification sent to Zefram <zefram <at> fysh.org>:
bug acknowledged by developer. (Wed, 19 Apr 2017 13:48:01 GMT) Full text and rfc822 format available.

Message #13 received at 26260-done <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> igalia.com>
To: 26260-done <at> debbugs.gnu.org
Subject: Re: bug#26260: ~f SRFI-19 format specifier mishandles one-digit
 seconds value
Date: Wed, 19 Apr 2017 15:46:54 +0200
thanks




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 18 May 2017 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 345 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.