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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,287e8ed2b0c0aabf,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-23 17:04:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!dimensional.com!pulsar.dimensional.com!coop.net!newsfeed1.global.lmco.com!svlnews.lmms.lmco.com!not-for-mail From: Paul A Storm Newsgroups: comp.lang.ada Subject: Zeller's Algorithm Date: Tue, 23 Jul 2002 16:56:15 -0700 Organization: alphabetically please Message-ID: <3D3DED1F.24DE3AC8@lmco.com> NNTP-Posting-Host: 129.197.52.149 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.79 [en] (X11; U; SunOS 5.6 sun4u) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:27344 Date: 2002-07-23T16:56:15-07:00 List-Id: 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