bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#70322: 30.0.50; format-seconds with %z doesn't handle zero input cor


From: Stephen Berman
Subject: bug#70322: 30.0.50; format-seconds with %z doesn't handle zero input correctly
Date: Wed, 10 Apr 2024 13:23:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Wed, 10 Apr 2024 11:59:42 +0200 Herman@debbugs.gnu.org, Géza 
<geza.herman@gmail.com> wrote:

> When the input seconds is 0, format-seconds emits the full string. For
> example,
>
> (format-seconds "%Y, %D, %H, %M, %z%S" 0)
>
> returns "0 years, 0 days, 0 hours, 0 minutes, 0 seconds"
>
> instead of "0 seconds".
>
> (format-seconds "%Y, %D, %H, %M, %z%S" 1) correctly returns "1 second".

The attached patch seems to fix this.

Steve Berman

Attachment: txtu_7CV61it4.txt
Description: format-seconds patch


reply via email to

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