Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
Good Thursday and Easter Date function Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
30-Jun-03
Category
Algorithm
Language
Delphi 2.x
Views
135
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Manuel Sarmiento

Here is another function that calculates the Good Thursday and any other related 
date for eny year. The algorithm provided here is straightforward in the sense that 
it calculates the Good Thursday (which is the jewish passover) as the thursday 
ocurring in the same week as the first spring full moon. Obviously the function can 
be easily adapted to calculate any full moon down to the second.

Answer:

1   function good_thursday(year: integer): tdatetime;
2   const
3     full_moon: tdatetime = 34804.33889; {15/4/95 8:08}
4     sunday: tdatetime = 1;
5     sinodic_month: tdatetime = 29.53058912;
6   
7   var
8     equinoccio: tdatetime;
9     lunar_months: double;
10    full_moon, weeks: double;
11  
12  begin
13    if year < 100 then
14      if year year := year + 2000
15    else
16      year := year + 1900;
17    equinoccio := encodedate(year, 3, 21);
18    lunar_months := 10000 - Int(10000 - (equinoccio - full_moon) / sinodic_month);
19    full_moon := full_moon + sinodic_month * lunar_months;
20    weeks := 10000 - Int(10000 - (full_moon - sunday) / 7);
21    good_thursday := sunday + 7 * weeks - 3;
22  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC