unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Zefram <zefram@fysh.org>
Cc: 26165-done@debbugs.gnu.org
Subject: bug#26165: date-week-day screws up prior to AD 1
Date: Sun, 21 Oct 2018 16:41:06 -0400	[thread overview]
Message-ID: <87o9bnyqvx.fsf@netris.org> (raw)
In-Reply-To: <20170318234528.GL6518@fysh.org> (Zefram's message of "Sat, 18 Mar 2017 23:45:28 +0000")

Zefram <zefram@fysh.org> writes:

> Looking at day of the week, via SRFI-19's date-week-day:
>
> scheme@(guile-user)> (use-modules (srfi srfi-19))
> scheme@(guile-user)> (julian-day->date 1721426 0) 
> $1 = #<date nanosecond: 0 second: 0 minute: 0 hour: 12 day: 1 month: 1 year: 1 zone-offset: 0>
> scheme@(guile-user)> (date-week-day (julian-day->date 1721426 0))
> $2 = 1
> scheme@(guile-user)> (date-week-day (julian-day->date 1721425 0))
> $3 = 6
>
> The output for 0001-01-01, Monday, is correct.  The preceding day is
> actually a Sunday, but Saturday was shown.  Looking at the code, this
> bug arises for the same reason as the problem with date-year-day raised
> in bug#26151.

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

     Thanks!
       Mark





      parent reply	other threads:[~2018-10-21 20:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-18 23:45 bug#26165: date-week-day screws up prior to AD 1 Zefram
2017-03-19  1:01 ` Zefram
2018-10-21 20:41 ` Mark H Weaver [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9bnyqvx.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=26165-done@debbugs.gnu.org \
    --cc=zefram@fysh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).