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

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

[debbugs-tracker] bug#23664: closed (Date Problem: Wrong return using la


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#23664: closed (Date Problem: Wrong return using last month today (2016-05-31))
Date: Tue, 31 May 2016 19:33:03 +0000

Your message dated Tue, 31 May 2016 13:32:04 -0600
with message-id <address@hidden>
and subject line Re: bug#23664: Date Problem: Wrong return using last month 
today (2016-05-31)
has caused the debbugs.gnu.org bug report #23664,
regarding Date Problem: Wrong return using last month today (2016-05-31)
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
23664: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23664
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Date Problem: Wrong return using last month today (2016-05-31) Date: Tue, 31 May 2016 15:14:18 -0300

address@hidden ~]# date

Tue May 31 15:10:47 BRT 2016

 

address@hidden ~]# date -d"last month"

Sun May  1 15:10:52 BRT 2016

 

address@hidden ~]# date -d"last day last month"

Sat Apr 30 15:10:54 BRT 2016

address@hidden ~]#

 

Atte.

 

Felippe Silvestre


--- End Message ---
--- Begin Message --- Subject: Re: bug#23664: Date Problem: Wrong return using last month today (2016-05-31) Date: Tue, 31 May 2016 13:32:04 -0600 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
tag 23664 notabug
thanks

On 05/31/2016 12:14 PM, Felippe Silvestre wrote:
> address@hidden ~]# date
> 
> Tue May 31 15:10:47 BRT 2016
> 
>  
> 
> address@hidden ~]# date -d"last month"
> 
> Sun May  1 15:10:52 BRT 2016

You've hit a FAQ; relative date terms like "last month" are easier to
code if they merely add a fixed amount of 30 days, rather than a
variable logical amount, particularly since the amount that would be
variable may depend on things like daylight savings changes.

https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-date-command-is-not-working-right_002e

There is work underway to add a 'date --debug' option that will make it
more obvious HOW date is arriving at its results when presented with
inherently ambiguous requests, such as using "last month" near the
boundary of a month.

I'm closing out this particular request in the bug database, since it is
known behavior, but feel free to add more comments or even provide a
reason that it should be reopened if what has been mentioned above is
insufficient to help you with your use of 'date'.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

reply via email to

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