How to programmatically determine Good Friday

B

Ben

Hi all,

I understand that Good Friday is different every year based on Full
Moon. Given, that, if I know the Good Friday date falls on one year, is
there a way I can use it as a "seed" and use it to compute all future
years of the date of Good Friday? Is there an algorithm for that?


Thanks,

Ben
 
X

XPS350

Hi all,

I understand that Good Friday is different every year based on Full
Moon.  Given, that, if I know the Good Friday date falls on one year, is
there a way I can use it as a "seed" and use it to compute all future
years of the date of Good Friday?  Is there an algorithm for that?

Thanks,

Ben

As Good Friday is two days before Easter you have your answer when you
know when it is Easter. This function will calculate it for you:


Function Pasen(Jaar As Integer) As Date
Dim A As Byte
Dim B As Byte
Dim C As Byte
Dim D As Byte
Dim E As Byte

A = Jaar Mod 19
B = Int(Jaar / 100)
C = Int((3 * B - 5) / 4)
D = (Int(12 + 11 * A + (8 * B + 13) / 25 - C) Mod 30 + 30) Mod 30

If 11 * D < A + 1 Then
E = 56 - D
Else
E = 57 - D
End If

Pasen = DateValue("01/03/" & Str(Jaar)) + E - 1 - Int(E + (5 * Jaar) /
4 - C) Mod 7

End Function

This one is in Dutch.
Pasen = Easter
Jaar = Year


Groeten,

Peter
http://access.xps350.com
 
V

vanderghast

One matching Catholic & Protestant Easter Sunday (by opposition to Orthodox
Easter, as example): http://aa.usno.navy.mil/faq/docs/easter.php

Other algorithm also exist (such as the one due to Euler) but the one given
in the reference is relatively simple (no if-then-else, no explicit use of
modulo)

Note that it returns Easter Sunday.



Vanderghast, Access MVP
 
B

Ben

Peter, Vanderghast -

Thank you both for your very helpful suggestions. Much appreciated!

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top