bug-guile
[Top][All Lists]
Advanced

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

bug#26260: ~f SRFI-19 format specifier mishandles one-digit seconds valu


From: Andy Wingo
Subject: bug#26260: ~f SRFI-19 format specifier mishandles one-digit seconds value
Date: Wed, 19 Apr 2017 15:44:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

On Sun 26 Mar 2017 04:09, Zefram <address@hidden> 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 via email to

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