🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4706

HOW TO CALCULATE THE

#4706
From: mlf
Date: Fri, 26 Jan 1996 09:08
98 lines
3450 bytes
-=> News wrote on 01-25-96  15:56 the following:

 Ne> Newsgroups: comp.std.c
 Ne> From: juggler@iquest.net (Phil Paxton)
 Ne> Subject: Re: How to calculate the Holy Easter.
 Ne> Organization: IQuest Internet, Inc.
 Ne> Date: Thu, 25 Jan 1996 02:19:33 GMT

 Ne> chierici@cs.unibo.it (Andrea Chierici) writes:

 >Hi, can anybody send me a C function to calculate the Easter of every year?
 >Thanks in advance,
 >                        Andrea.

 Ne> This was floating about the 'net:

 Ne> Path:
 Ne> dorite!news.sprintlink.net!gatech!news.mathworks.com!news.kei.com!simte
 Ne> l!zippo. uwasa.fi!poiju.uwasa.fi!not-for-mail
 Ne> From: A.Timmerman@beta.hsholland.nl (Abe Timmerman)
 Ne> Newsgroups: comp.lang.pascal
 Ne> Subject: Easter-date
 Ne> Date: 24 May 1995 12:29:11 -0000
 Ne> Organization: Hogeschool Holland Sector Beta
 Ne> Lines: 47
 Ne> Sender: ts@poiju.uwasa.fi
 Ne> Approved: news@poiju.uwasa.fi
 Ne> Message-ID: <ts9505241228.4174@poiju.uwasa.fi>
 Ne> NNTP-Posting-Host: poiju.uwasa.fi
 Ne> Summary: Reposted by Timo Salmi

 Ne> I saw the message about the easter-date program and knew I had an
 Ne> algorithm somewhere.

 Ne> This is the algorithm Gauss published in 1800 to calculate
 Ne> Easter-date. The notes in my textbook stated that the earliest date for
 Ne> Easter is March 22, and
 Ne> the latest date is April 25.

 Ne> Here's a pascal procedure for the Gauss-Easter algorithm:
 Ne> ------------------------------------------------------------
 Ne> procedure Easter(var Month, Day: Integer; Year: Integer);
 Ne> { Based on the formulas/algorithm published bij Gauss in 1800 }
 Ne> var a, b, c, d, e, f, k, m, n, p, q: Integer;
 Ne> begin
 Ne> a := Year mod 19;
 Ne> b := Year mod 4;
 Ne> c := Year mod 7;
 Ne> k := Year div 100;
 Ne> p := k div 3;
 Ne> q := k - k div 4;
 Ne> m := (q - p + 15) mod 30;
 Ne> n := (q + 4) mod 7;
 Ne> d := (19*a + m) mod 30;
 Ne> e := (2*b + 4*c + 6*d + n) mod 7;
 Ne> f := d + e - 9;
 Ne> if f <= 0 then
 Ne> begin
 Ne> Month := 3;
 Ne> Day := 31 + f;
 Ne> end
 Ne> else
 Ne> begin
 Ne> Month := 4;
 Ne> if f = 26 then Day := 19
 Ne> else if (f = 25) and (d = 28) then Day := 18
 Ne> else Day := f;
 Ne> end;{ else }
 Ne> end;{ Easter }

 Ne> Greetings,

 Ne> Abe Timmerman
 Ne> Hogeschool Holland
 Ne> (HHIT: Center for education and Information Technology)
 Ne> The Netherlands
 Ne> Email:A.Timmerman@Beta.hsholland.nl

 Ne> (And remeber...)


 Ne> --
 Ne> ------------------------------------
 Ne> Phil Paxton :: Fishers, Indiana, USA


Er, ah, could somebody translate this to C???

 ----------------------------------------------------------
+     Mike Flower     +         Software Designer          +
+ 10227 Langmuir Ave. + >>>>>> Available for hire <<<<<<   +
+ Sunland, CA  91040  + Call now for an interview, Today!  +
+         USA         +           mlf@support.com          +
+     818-353-8394    +        mlf@support.la.ca.us        +
 ----------------------------------------------------------
 
___ Blue Wave/QWK v2.12
Technical Details
Message-ID: <9601260108.01LNF04@support.com>
Path: arc1-ca.pugleaf.net!uu4news.netcom.com!lavc!lavc!mlf
References: <4e88us$o82@scotsman.ed.ac.uk>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!uu4news.netcom.com!lavc!lavc!mlf
From: mlf@support.com
Subject: HOW TO CALCULATE THE
Message-ID: <9601260108.01LNF04@support.com>
References: <4e88us$o82@scotsman.ed.ac.uk>
Organization: L.A. Valley College Public BBS (818)985-7150
X-Mailer: TBBS/PIMP v3.35
Distribution: world
Date: Fri, 26 Jan 96 01:08:23 -0800