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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC 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-24 00:59:21 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-zh.ip-plus.net!news.ip-plus.net!not-for-mail From: Thomas Wolf Newsgroups: comp.lang.ada Subject: Re: Zeller's Algorithm Date: Wed, 24 Jul 2002 09:59:18 +0200 Organization: --- Message-ID: References: <3D3DED1F.24DE3AC8@lmco.com> Reply-To: t_wolf@angelfire.com NNTP-Posting-Host: pargate2.paranor.ch X-Trace: rex.ip-plus.net 1027497549 17022 195.65.4.190 (24 Jul 2002 07:59:09 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Wed, 24 Jul 2002 07:59:09 +0000 (UTC) X-Newsreader: MicroPlanet Gravity v2.50 Xref: archiver1.google.com comp.lang.ada:27350 Date: 2002-07-24T09:59:18+02:00 List-Id: paul.a.storm@lmco.com 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. You might try the Util.Calendar packages from my Util subsystem, available at the URL http://home.tiscalinet.ch/t_wolf/tw/ada95/util/ Util.Calendars.Universal.Day_Of_Week produces the correct results. See the test driver in ./test/calendar_test.adb for some examples. The Util subsystem is published under the GMGPL. -- ----------------------------------------------------------------- Thomas Wolf e-mail: t_wolf@angelfire.com