Here is a general method of calculating the date Easter (always on a Sunday) and Good Friday (always on the preceding Friday). Many companies will treat Good Friday as a non-work day.
The date of Easter is defined as the first Sunday following the first full moon after the spring equinox (generally around March 19-21). So, it will vary based on the lunar cycle. I would expect that other religious holidays based on the lunar cycle will have a similar solution.
from a Scientific American column by Ian Stewart in March, 2001
As usual, the mathematicians are far ahead of the programmers. Gauss did a nearly perfect method back in the early 1800's.
Knuth did a version in 1962,
and the NOAA method ... http://aa.usno.navy.mil/faq/docs/easter.php
From the article ...
Choose any year of the Gregorian calendar and call it x. To determine the date of Easter, carry out the following 10 calculations (it’s easy to program them on a computer):
1. Divide x by 19 to get a quotient (which we ignore) and a remainder A. This is the year’s position in the 19-year lunar cycle. (A + 1 is the year’s Golden Number.)
2. Divide x by 100 to get a quotient B and a remainder C.
3. Divide B by 4 to get a quotient D and a remainder E.
4. Divide 8B + 13 by 25 to get a quotient G and a remainder (which we ignore).
5. Divide 19A + B – D – G + 15 by 30 to get a quotient (which we ignore) and a remainder H.
(The year’s Epact is 23 – H when H is less than 24 and 53 – H otherwise.)
6. Divide A + 11H by 319 to get a quotient M and a remainder (which we ignore).
7. Divide C by 4 to get a quotient J and a remainder K.
8. Divide 2E + 2J – K – H + M + 32 by 7 to get a quotient (which we ignore) and a remainder L.
9. Divide H – M + L + 90 by 25 to get a quotient N and a remainder (which we ignore).
10. Divide H – M + L + N + 19 by 32 to get a quotient (which we ignore) and a remainder P.Easter Sunday is the Pth day of the Nth month (N can be either 3 for March or 4 for April). The year’s dominical letter can be found by dividing 2E + 2J – K by 7 and taking the remainder (a remainder of 0 is equivalent to the letter A, 1 is equivalent to B, and so on).
Let’s try this method for x = 2001: (1) A = 6; (2) B = 20, C = 1; (3) D = 5, E = 0; (4) G = 6; (5) H = 18; (6) M = 0; (7) J = 0, K = 1; (8) L = 6; (9) N = 4; (10) P = 15. So Easter 2001 is April 15.
For the Western (Julian Calendar)
CREATE function dbo.ccoc_fnEasterDate
-- Declare the return variable here
DECLARE @easterDate datetime;
declare @a int = @yr %19;
declare @B int = @yr /100;
declare @C int = @yr % 100;
declare @D int = @B/4;
declare @E int = @B % 4;
declare @G int = (@B * 8) / 25;
declare @h int = ((19 * @a) + @B-@D-@G+15) % 30;
declare @M int = (@A + (11 * @h))/319;
declare @j-2 int = @C / 4;
declare @k int = @C % 4;
declare @L int = ((2 * @E) + (2 * @j-2)-@K-@H+@M+32) %7;
declare @N int = (@H-@M+@L+90)/25;
declare @P int = (@H-@M+@L+@N+19)%32;
set @easterDate = dateadd(mm, (@yr - 1900) * 12 + @n - 1 , @p - 1)
-- Return the result of the function