GNU bug report logs - #26101
Counterproductive calculation order in date

Previous Next

Package: coreutils;

Reported by: Ulf Zibis <Ulf.Zibis <at> gmx.de>

Date: Wed, 15 Mar 2017 00:42:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Ulf Zibis <Ulf.Zibis <at> gmx.de>
To: bug-coreutils <at> gnu.org
Subject: Re: bug#26101: Counterproductive calculation order in date
Date: Wed, 15 Mar 2017 14:43:47 +0100
[Message part 1 (text/plain, inline)]
Am 15.03.2017 um 13:44 schrieb Eric Blake:
> Maybe you are confused on how date implements "subtract a month".  It
> does NOT do "subtract 28, 29, 30, or 31 days as appropriate", but rather
> does "subtract 30 days, for lack of anything better to do".

Are you really sure ???
Here on my 8.25 version I get:
$ date -d "-12 month" +%F
2016-03-15
$ date -d "-360 day" +%F
2016-03-20

So I think my list for enhancements is still fully applicable.

-Ulf

PS: You may drop the copy to my personal email, so I don't get it twice, 
as I'm subscribed to the list.

[smime.p7s (application/pkcs7-signature, attachment)]

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

Previous Next


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