DateTime::Calendar::Liturgical::Christian is a Perl module that will return the name, season, week number and liturgical colour for any day in the Gregorian calendar. It will eventually support the liturgical calendars of several churches (hopefully at least Anglican, Lutheran, Orthodox and Roman Catholic). At present it only knows the calendar for the Episcopal Church of the USA.
If you find bugs, or if you have information on the calendar of another liturgical church, please do let me know (thomas at thurman dot org dot uk).
$dtclc = DateTime::Calendar::Liturgical::Christian->new(
print $dtclc->name(); # 'Pentecost'
print $dtclc->colour(); # 'red'