From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,287e8ed2b0c0aabf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-30 14:30:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!newsfeed.nyc.globix.net!news.stealth.net!news.stealth.net!newsfeed.frii.net!newsfeed.frii.net!dimensional.com!pulsar.dimensional.com!coop.net!newsfeed1.global.lmco.com!svlnews.lmms.lmco.com!newsfeed3.global.lmco.com!news.vf.lmco.com!not-for-mail From: Rick Maffei Newsgroups: comp.lang.ada Subject: Re: Zeller's Algorithm Date: Tue, 30 Jul 2002 12:17:02 -0500 Organization: Lockheed Martin Corp, Valley Forge PA Message-ID: <3D46CA0E.BCD17D9C@none.provided> References: <3D3DED1F.24DE3AC8@lmco.com> NNTP-Posting-Host: dhcpeng1153.syr.lmco.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: knight.vf.lmco.com 1028049273 10393 144.219.228.128 (30 Jul 2002 17:14:33 GMT) X-Complaints-To: usenet@news.vf.lmco.com NNTP-Posting-Date: 30 Jul 2002 17:14:33 GMT X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:27500 Date: 2002-07-30T17:14:33+00:00 List-Id: Paul A Storm wrote: > > Help! > > I am trying to find a Ada implementation of Zeller's algorithm that > works! I have found several on the web > but none of them have worked right. > > For example I tried this one from > http://www.adapower.com/alg/zeller.html Inputting June 19 2002 returns > Wednesday, correct. Inputting June 19 1999 produces Sunday, incorrect. > That's a Saturday. Inputting > February 3, 2002 produces Friday, incorrect. That's a Sunday. What > gives? > > I have had similar weird results using other similar Ada Zeller versions > I've found on the web. > > I'm wondering if maybe there's a difference in rounding down. Perhaps a > 83 vs. 95 peculiarity? > I don't think so. It produces compilation errors using the -gnat83 > switch. > > I'm running gnat 3.13a on Sun 2.6 > > Argh! Anybody got any ideas on how to fix this or know of an Ada > implementation of Zeller's algorithm > that works? > > Paul Storm While reviewing the latest Risks Digest, I came across the following item titled "Possible day-of-week error" concerning the Zeller algorithm: http://catless.ncl.ac.uk/Risks/22.18.html#subj10.1 Just thought it may be of interest in this thread. Rick Maffei