How can I calculate what date Catholic Good Friday falls on, given a year?

Here’s a great article that should help you build your algorithm http://www.codeproject.com/KB/datetime/christianholidays.aspx Based on this example, you should be able to write: DateTime goodFriday = EasterSunday(DateTime.Now.Year).AddDays(-2); Full Example: public static DateTime EasterSunday(int year) { int day = 0; int month = 0; int g = year % 19; int c = year / 100; int … Read more

Function to return date of Easter for the given year

Python: using dateutil’s easter() function. >>> from dateutil.easter import * >>> print easter(2010) 2010-04-04 >>> print easter(2011) 2011-04-24 The functions gets, as an argument, the type of calculation you like: EASTER_JULIAN = 1 EASTER_ORTHODOX = 2 EASTER_WESTERN = 3 You can pick the one relevant to the US. Reducing two days from the result would … Read more

How can I calculate what date Good Friday falls on, given a year?

Here’s a great article that should help you build your algorithm http://www.codeproject.com/KB/datetime/christianholidays.aspx Based on this example, you should be able to write: DateTime goodFriday = EasterSunday(DateTime.Now.Year).AddDays(-2); Full Example: public static DateTime EasterSunday(int year) { int day = 0; int month = 0; int g = year % 19; int c = year / 100; int … Read more