Catholic Calendar

Code for automatically figuring out the Liturgical Season and changing the colour on a website.

Overview

Catholic Calendar is a small PHP project that calculates the current liturgical season of the Catholic Church and makes it available for use in a website theme. The original use case was simple: change the visual colour treatment of a Catholic blog automatically so that the site reflected the rhythm of the Church year, with violet in Lent and Advent, white or gold in Easter, and green through Ordinary Time.

It started as a practical piece of code for a live site, then later became an open-source utility for anyone building similar Catholic web projects.

Why I Built It

Back in 2006, while building an early Catholic blog on WordPress, I wanted the site to respond to the liturgical calendar rather than remain visually static all year.

That sounds straightforward until you get into the mechanics of the calendar itself. Many major feast days and seasons depend on the date of Easter, which changes every year. Once Easter moves, the rest of the calendar moves with it.

So the project became an exercise in turning a domain-specific set of religious calendar rules into something deterministic and useful in code.

How It Works

The core of the project is an implementation of the Meeus/Jones/Butcher computus algorithm for calculating Easter. From there, the rest of the liturgical calendar can be derived without relying on manually updated lookup tables.

That was the key design decision: make the logic self-contained and date-driven, so the code could run against the current server date and continue working year after year without maintenance overhead.

In practical terms, the project:

  • calculates Easter for the active year
  • derives the surrounding liturgical seasons and key dates from that calculation
  • exposes enough information for a website to switch styling or behaviour based on the current season

Why It Was Interesting

This project sat at an intersection I still find compelling: software as a way of encoding complex human systems that already existed long before computers.

The challenge was not just writing PHP. It was understanding the shape of the calendar, choosing an algorithm that would hold up over time, and translating a set of traditions and rules into something precise enough for software.

That mix of domain modelling and implementation is the part that made the work memorable.

Technical Notes

  • Language: PHP
  • Repository age: originally published more than a decade ago
  • Repository scope: focused utility rather than framework
  • Maintenance model: calculation-based, with no annual table updates required

Links

Looking Back

This was the first time I shared some code on Github. I have been writing code for decades at this point, but this was the first time I created something that I thought might be useful to share with a wider (albeit still pretty niche) audience.

It is also a good reminder that small utilities can be worth publishing. Not every useful open-source project needs to be large. Sometimes a narrowly focused tool is exactly what another builder needs.

Back to Desk