How to calculate religious holidays in SQL

I found this a few years ago, but like most things forgot where i found it. The whole thing is written to exist in a SQL database.

Holiday Calendar Calculator

It adds a table that references the holidays you want to generate and also a table valued function that takes a date range as it’s arguments. The output is all the holidays listed in the table by date and title.
For more usefull SQL (and other) scripts and help, visit http://tek-tips.com