GNU bug report logs - #41480
Chars out of order in date.c string

Previous Next

Package: coreutils;

Reported by: Anders Jonsson <anders.jonsson <at> norsjovallen.se>

Date: Sat, 23 May 2020 11:42:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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 41480 in the body.
You can then email your comments to 41480 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-coreutils <at> gnu.org:
bug#41480; Package coreutils. (Sat, 23 May 2020 11:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anders Jonsson <anders.jonsson <at> norsjovallen.se>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 23 May 2020 11:42:02 GMT) Full text and rfc822 format available.

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

From: Anders Jonsson <anders.jonsson <at> norsjovallen.se>
To: bug-coreutils <at> gnu.org
Cc: Göran Uddeborg <goeran <at> uddeborg.se>
Subject: Chars out of order in date.c string
Date: Sat, 23 May 2020 13:41:08 +0200
Hi,
I noticed one thing when having a look at the Swedish translation of 
coreutils.

>#: src/date.c:196
>msgid ""
>"  %F   full date; like %+4Y-%m-%d\n"


This doesn't give the expected result when I try it in coreutils 8.30 in 
Debian testing:

>date +%F
2020-05-23
>date +%+4Y-%m-%d
%+4Y-05-23


If the "%" and the "+" change places in the string above we get the 
expected result:

>date +%4Y-%m-%d
2020-05-23


My suggestion would thus be to change the character order so the string 
becomes "  %F   full date; like +%4Y-%m-%d\n"


Regards,
Anders Jonsson




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Sat, 23 May 2020 15:58:01 GMT) Full text and rfc822 format available.

Notification sent to Anders Jonsson <anders.jonsson <at> norsjovallen.se>:
bug acknowledged by developer. (Sat, 23 May 2020 15:58:02 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Anders Jonsson <anders.jonsson <at> norsjovallen.se>, 41480-done <at> debbugs.gnu.org
Cc: Göran Uddeborg <goeran <at> uddeborg.se>
Subject: Re: bug#41480: Chars out of order in date.c string
Date: Sat, 23 May 2020 08:57:23 -0700
On 5/23/20 4:41 AM, Anders Jonsson wrote:

> I noticed one thing when having a look at the Swedish translation of coreutils.
> 
>>#: src/date.c:196
>>msgid ""
>>"  %F   full date; like %+4Y-%m-%d\n"

There must be some confusion here, because this translation is for coreutils
8.31 and later.

> This doesn't give the expected result when I try it in coreutils 8.30 in Debian
> testing:

That's because the behavior of coreutils changed in 8.31. The translation string
you're talking about was introduced in coreutils 8.31, so I'm puzzled as to why
it'd be used with coreutils 8.30.

Here's the behavior change in 8.31:

https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=188d87b05190690d6f8b0577ec65ef221a711d08

and here's the closely-related documentation change in 8.31:

https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=2ab2f7a422652a9ec887e08ca8935b44e9629505




Information forwarded to bug-coreutils <at> gnu.org:
bug#41480; Package coreutils. (Sat, 23 May 2020 16:42:02 GMT) Full text and rfc822 format available.

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

From: Pádraig Brady <P <at> draigBrady.com>
To: 41480 <at> debbugs.gnu.org, anders.jonsson <at> norsjovallen.se
Subject: Re: bug#41480: Chars out of order in date.c string
Date: Sat, 23 May 2020 17:41:44 +0100
On 23/05/2020 16:57, Paul Eggert wrote:
> On 5/23/20 4:41 AM, Anders Jonsson wrote:
> 
>> I noticed one thing when having a look at the Swedish translation of coreutils.
>>
>>> #: src/date.c:196
>>> msgid ""
>>> "  %F   full date; like %+4Y-%m-%d\n"
> 
> There must be some confusion here, because this translation is for coreutils
> 8.31 and later.
> 
>> This doesn't give the expected result when I try it in coreutils 8.30 in Debian
>> testing:
> 
> That's because the behavior of coreutils changed in 8.31. The translation string
> you're talking about was introduced in coreutils 8.31, so I'm puzzled as to why
> it'd be used with coreutils 8.30.
> 
> Here's the behavior change in 8.31:
> 
> https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=188d87b05190690d6f8b0577ec65ef221a711d08
> 
> and here's the closely-related documentation change in 8.31:
> 
> https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=2ab2f7a422652a9ec887e08ca8935b44e9629505

I think the point is that commonly available online docs
have gotten ahead of commonly available coreutils versions.
When copying and pasting, the issue occurs.

This could be considered too much information anyway
since the distinction only applies to future years beyond the year 9999.
I.E. the "like %Y-%m-%d" is better in the --help and man output,
since it's more concise and compatible.
The info doc can continue to expand on the details.

cheers,
Pádraig.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 21 Jun 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 59 days ago.

Previous Next


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