* bug#26260: ~f SRFI-19 format specifier mishandles one-digit seconds value
@ 2017-03-26 2:09 Zefram
2017-04-19 13:44 ` Andy Wingo
0 siblings, 1 reply; 3+ messages in thread
From: Zefram @ 2017-03-26 2:09 UTC (permalink / raw)
To: 26260
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#26260: ~f SRFI-19 format specifier mishandles one-digit seconds value
2017-03-26 2:09 bug#26260: ~f SRFI-19 format specifier mishandles one-digit seconds value Zefram
@ 2017-04-19 13:44 ` Andy Wingo
2017-04-19 13:46 ` Andy Wingo
0 siblings, 1 reply; 3+ messages in thread
From: Andy Wingo @ 2017-04-19 13:44 UTC (permalink / raw)
To: Zefram; +Cc: 26260
On Sun 26 Mar 2017 04:09, Zefram <zefram@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#26260: ~f SRFI-19 format specifier mishandles one-digit seconds value
2017-04-19 13:44 ` Andy Wingo
@ 2017-04-19 13:46 ` Andy Wingo
0 siblings, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2017-04-19 13:46 UTC (permalink / raw)
To: 26260-done
thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-19 13:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-26 2:09 bug#26260: ~f SRFI-19 format specifier mishandles one-digit seconds value Zefram
2017-04-19 13:44 ` Andy Wingo
2017-04-19 13:46 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).