# Church website:  easy or hard to make the colour of the border match liturgical colours?

**URL:** <https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198>\
**Category:** Factual Questions\
**Created:** [February 9, 2015, 7:00am UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198 "2015-02-09T07:00:49Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Northern\_Piper](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/northern_piper/32/5304_2.png) [@Northern\_Piper](https://boards.straightdope.com/u/Northern_Piper)\
**Post date:** [February 9, 2015, 7:00am UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/1 "2015-02-09T07:00:49Z")

</div>

Our church’s website has a border on the home page, coloured a forest green.

I got to thinking: would it be possible to have the website coded so that it automatically changed the colour of the border to match the colours of the liturgical year? Purple for Lent and Advent, white for Easter and Christmas-tide, green for ordinary time, and so on? How difficult or easy would that type of coding be?

---

<div class="post-metadata">

**Author:** ![Northern\_Piper](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/northern_piper/32/5304_2.png) [@Northern\_Piper](https://boards.straightdope.com/u/Northern_Piper)\
**Post date:** [February 9, 2015, 7:02am UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/2 "2015-02-09T07:02:00Z")

</div>

Yes, I mis-spelt “church” in the thread title. It’s late.

---

<div class="post-metadata">

**Author:** ![tellyworth](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@tellyworth](https://boards.straightdope.com/u/tellyworth)\
**Post date:** [February 9, 2015, 7:53am UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/3 "2015-02-09T07:53:51Z")

</div>

Any web developer or designer ought to be able to do it. They’d probably bill an hour or two’s work depending on your web site platform and various details.

---

<div class="post-metadata">

**Author:** ![Melbourne](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Melbourne](https://boards.straightdope.com/u/Melbourne)\
**Post date:** [February 9, 2015, 9:29am UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/4 "2015-02-09T09:29:52Z")

</div>

Working out dates is a notoriously difficult simple problem (witness the many program which thought that 2000 would not be a leap year), and church dates are a notoriously difficult type of simple date calculation (because cycles of the moon are combined with cycles of the sun, including leap years and leap months)

I’d give you even money that you get an error in the dates, even if you do it by typing in a large table copied out of your published documentation.

Apart from that, as mentioned above, trivial.

---

<div class="post-metadata">

**Author:** ![robert\_columbia](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@robert\_columbia](https://boards.straightdope.com/u/robert_columbia)\
**Post date:** [February 9, 2015, 3:13pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/5 "2015-02-09T15:13:37Z")

</div>

Yes, this is doable. You could do it with something like PHP and have the color property conditionalized on the result of an algorithm. Of course, liturgical calendars can be pretty complex (e.g. requiring harmonizing solar and lunar cycles), so you might be better off instead implementing a call to some third-party site rather than do all the math yourself.

In pseudocode, it might look like this:

if (condition for Lent) { Color= Purple}  
if (condition for Easter} {Color = White}  
if (condition for Pentecost} {Color = Yellow}  
if (condition for Advent} {…  
if (condition for Christmas} {…  
else {color = green}

---

<div class="post-metadata">

**Author:** ![robert\_columbia](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@robert\_columbia](https://boards.straightdope.com/u/robert_columbia)\
**Post date:** [February 9, 2015, 3:16pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/6 "2015-02-09T15:16:35Z")

</div>

Anyone know the correct algorithm for identifying the season of the Second Coming?

---

<div class="post-metadata">

**Author:** ![robert\_columbia](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@robert\_columbia](https://boards.straightdope.com/u/robert_columbia)\
**Post date:** [February 9, 2015, 3:17pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/7 "2015-02-09T15:17:51Z")

</div>

Of course, another option would be to simply have a deacon login regularly and change the color manually or something.

---

<div class="post-metadata">

**Author:** ![Colibri](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/colibri/32/1841_2.png) [@Colibri](https://boards.straightdope.com/u/Colibri)\
**Post date:** [February 9, 2015, 3:20pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/8 "2015-02-09T15:20:40Z")

</div>

> [@Northern\_Piper](#):
>
> Yes, I mis-spelt “church” in the thread title. It’s late.

Fixed.

---

<div class="post-metadata">

**Author:** ![Kinthalis](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kinthalis/32/16084_2.png) [@Kinthalis](https://boards.straightdope.com/u/Kinthalis)\
**Post date:** [February 9, 2015, 3:22pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/9 "2015-02-09T15:22:16Z")

</div>

Yeah, I second the call to some sort of online api, if there is one.

It could be as simple as setting a variable when you want to change things in your admin panel. The low tech way of doing this would be to make sure that border colors are declared in a css file, and then switch out the classes in the HTML when needed.

---

<div class="post-metadata">

**Author:** ![Saint\_Cad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saint_cad/32/18907_2.png) [@Saint\_Cad](https://boards.straightdope.com/u/Saint_Cad)\
**Post date:** [February 9, 2015, 3:47pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/10 "2015-02-09T15:47:36Z")

</div>

The problem is pretty straightforward. The only variable to account for is the day Easter falls on and everything is either an offset from that day like Pentecost or constant days like Advent. You could probably crank it out in javascript.

---

<div class="post-metadata">

**Author:** ![Kinthalis](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kinthalis/32/16084_2.png) [@Kinthalis](https://boards.straightdope.com/u/Kinthalis)\
**Post date:** [February 9, 2015, 4:01pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/11 "2015-02-09T16:01:04Z")

</div>

> [@Saint\_Cad](#):
>
> The problem is pretty straightforward. The only variable to account for is the day Easter falls on and everything is either an offset from that day like Pentecost or constant days like Advent. You could probably crank it out in javascript.

Was just reading up on this, since I didn’t really know anything about it. It does seem pretty straightforward. I can probably whip something up by tomorrow, Norther Piper, if you can wait that long.

---

<div class="post-metadata">

**Author:** ![tellyworth](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@tellyworth](https://boards.straightdope.com/u/tellyworth)\
**Post date:** [February 9, 2015, 9:05pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/12 "2015-02-09T21:05:49Z")

</div>

> [@Kinthalis](#):
>
> Yeah, I second the call to some sort of online api, if there is one.

That’s overcomplicating things. The dates are predictable, you just need a table of dates for the next 20 years or so. The church should be able to provide that.

---

<div class="post-metadata">

**Author:** ![kopek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kopek/32/337_2.png) [@kopek](https://boards.straightdope.com/u/kopek)\
**Post date:** [February 10, 2015, 1:41am UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/13 "2015-02-10T01:41:18Z")

</div>

Us Lutherans stop at matching the color of our Jello to the liturgical season; not enough of us have real websites to have gotten that far.

---

<div class="post-metadata">

**Author:** ![dracoi](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dracoi](https://boards.straightdope.com/u/dracoi)\
**Post date:** [February 10, 2015, 2:00am UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/14 "2015-02-10T02:00:37Z")

</div>

> [@robert\_columbia](#):
>
> Anyone know the correct algorithm for identifying the season of the Second Coming?

That one’s easy. It’s like flying cars and fusion reactors. Take the current year and add a random number between 20 and 50.

---

<div class="post-metadata">

**Author:** ![Saint\_Cad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saint_cad/32/18907_2.png) [@Saint\_Cad](https://boards.straightdope.com/u/Saint_Cad)\
**Post date:** [February 10, 2015, 3:05pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/15 "2015-02-10T15:05:42Z")

</div>

> [@dracoi](#):
>
> That one’s easy. It’s like flying cars and fusion reactors. Take the current year and add a random number between 20 and 50.

Like 42?

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [February 10, 2015, 3:08pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/16 "2015-02-10T15:08:36Z")

</div>

> [@](#):
>
> Quoth **kopec** :
> 
> Us Lutherans stop at matching the color of our Jello to the liturgical season; not enough of us have real websites to have gotten that far.

Wait, you mean that Lutherans use green as the color for every liturgical season?

---

<div class="post-metadata">

**Author:** ![Cunctator](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Cunctator](https://boards.straightdope.com/u/Cunctator)\
**Post date:** [February 10, 2015, 3:29pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/17 "2015-02-10T15:29:52Z")

</div>

This should be pretty simple. There are plenty of easily-programmable algorithms available that will calculate the date of Easter for any given calendar year. I use one to print an Ordo each year. Once the date of Easter (E) is known the other dates follow easily e.g. Lent begins on Ash Wednesday, which is E-46; Pentecost is on E+49 etc.

Advent is programmed to start on the Sunday falling between 27 November and 3 December.

---

<div class="post-metadata">

**Author:** ![Kinthalis](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kinthalis/32/16084_2.png) [@Kinthalis](https://boards.straightdope.com/u/Kinthalis)\
**Post date:** [February 10, 2015, 3:44pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/18 "2015-02-10T15:44:38Z")

</div>

Yeah, it was simple enough, even looking for the details on liturgical calculators yielded this:

[http://www.tulane.edu/~rscheidt/rcc\_calendar\_program.html](http://www.tulane.edu/~rscheidt/rcc_calendar_program.html)

Might be the only thing the OP needs.

---

<div class="post-metadata">

**Author:** ![Northern\_Piper](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/northern_piper/32/5304_2.png) [@Northern\_Piper](https://boards.straightdope.com/u/Northern_Piper)\
**Post date:** [February 10, 2015, 5:36pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/19 "2015-02-10T17:36:37Z")

</div>

> [@Kinthalis](#):
>
> I can probably whip something up by tomorrow, Norther Piper, if you can wait that long.

Thanks for the offer! You meant the calculation of dates, right? Not actual code to make it work in our web-page? (Sorry if that’s a naive question, but I know nothing about how web-pages actually work.)

I’ll take a look at the Tulane link, thanks!

---

<div class="post-metadata">

**Author:** ![Northern\_Piper](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/northern_piper/32/5304_2.png) [@Northern\_Piper](https://boards.straightdope.com/u/Northern_Piper)\
**Post date:** [February 10, 2015, 5:39pm UTC](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198/20 "2015-02-10T17:39:57Z")

</div>

> [@Cunctator](#):
>
> This should be pretty simple. There are plenty of easily-programmable algorithms available that will calculate the date of Easter for any given calendar year. I use one to print an Ordo each year. Once the date of Easter (E) is known the other dates follow easily e.g. Lent begins on Ash Wednesday, which is E-46; Pentecost is on E+49 etc.
> 
> Advent is programmed to start on the Sunday falling between 27 November and 3 December.

Advent (and the Sunday next before Advent, Stir-up Sunday) is the tricky one, since it doesn’t start a fixed number of days before Christmas. I think you’d have to program those specific dates for each year, wouldn’t you?

[Next page](https://boards.straightdope.com/t/church-website-easy-or-hard-to-make-the-colour-of-the-border-match-liturgical-colours/712198.md?page=2)
