Top-rated recipes tagged "church"http://code.activestate.com/recipes/tags/church/top/2008-09-30T16:57:29-07:00ActiveState Code RecipesLiturgical Calendar Year class (Python)
2008-09-30T16:57:29-07:00Martin Diershttp://code.activestate.com/recipes/users/4167352/http://code.activestate.com/recipes/576518-liturgical-calendar-year-class/
<p style="color: grey">
Python
recipe 576518
by <a href="/recipes/users/4167352/">Martin Diers</a>
(<a href="/recipes/tags/calendar/">calendar</a>, <a href="/recipes/tags/church/">church</a>).
</p>
<p>When initialized with a <code>year</code>, returns a class with a number of date attributes corresponding to common feasts of the western liturgical calendar. Number of Sundays after Epiphany and Trinity / Pentecost are also calculated, and stored in attributes. If the optional parameter <code>v2</code> is set to True, the calendar will return a post-Vatican II calendar which changes the date of Transfiguration Sunday, and the number of Sundays after Epiphany. In either case, the pre-Lent Sundays and Sundays after Pentecost will be set.</p>
<p><strong>Note:</strong> The <code>year</code> parameter is the year of the First Sunday in Advent - the beginning of the church year, and the resulting calendar thus ends in the following year.</p>