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

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

[debbugs-tracker] bug#21906: closed (julian-day->date negative input bre


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#21906: closed (julian-day->date negative input breakage)
Date: Sun, 21 Oct 2018 03:22:01 +0000

Your message dated Sat, 20 Oct 2018 23:20:44 -0400
with message-id <address@hidden>
and subject line Re: bug#21906: julian-day->date negative input breakage
has caused the debbugs.gnu.org bug report #21906,
regarding julian-day->date negative input breakage
to be marked as done.

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


-- 
21906: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21906
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: julian-day->date negative input breakage Date: Fri, 13 Nov 2015 14:31:04 +0000
scheme@(guile-user)> (use-modules (srfi srfi-19))
scheme@(guile-user)> (julian-day->date 0 0)
$1 = #<date nanosecond: 0 second: 0 minute: 0 hour: 12 day: 24 month: 11 year: 
-4714 zone-offset: 0>
scheme@(guile-user)> (julian-day->date -1 0)
$2 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: 24 month: 11 year: 
-4714 zone-offset: 0>
scheme@(guile-user)> (julian-day->date -100000 0)
$3 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: -19 month: 3 year: 
-4987 zone-offset: 0>
scheme@(guile-user)> (julian-day->date -10000000 0)
$4 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: -30 month: 0 year: 
-32092 zone-offset: 0>

Observe the various erroneous field values: negative hour, negative
day-of-month, zero month.  These occur in general for various negative
JD inputs.  Not only should the conversion not produce these kinds of
values, the date structure type probably ought to reject them if they
get that far.

-zefram



--- End Message ---
--- Begin Message --- Subject: Re: bug#21906: julian-day->date negative input breakage Date: Sat, 20 Oct 2018 23:20:44 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Zefram <address@hidden> writes:

> scheme@(guile-user)> (use-modules (srfi srfi-19))
> scheme@(guile-user)> (julian-day->date 0 0)
> $1 = #<date nanosecond: 0 second: 0 minute: 0 hour: 12 day: 24 month: 11 
> year: -4714 zone-offset: 0>
> scheme@(guile-user)> (julian-day->date -1 0)
> $2 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: 24 month: 11 
> year: -4714 zone-offset: 0>
> scheme@(guile-user)> (julian-day->date -100000 0)
> $3 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: -19 month: 3 
> year: -4987 zone-offset: 0>
> scheme@(guile-user)> (julian-day->date -10000000 0)
> $4 = #<date nanosecond: 0 second: 0 minute: 0 hour: -12 day: -30 month: 0 
> year: -32092 zone-offset: 0>

This is fixed by commit a58c7abd72648f77e4ede5f62a2c4e7969bb7f95 on the
stable-2.2 branch.  I'm closing this bug, but please reopen if
appropriate.

     Thanks!
       Mark


--- End Message ---

reply via email to

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