Well, anyways, I've been messing with the code some more, hopefully making it easier to use. So I will update your page using the new code and attach it here when it's done. I think a stripped down version of the script without any but the listed content from each month is right for the first one. For the second, I think I see what to do there as well, we can tweak either one later if you want.
Also, for Advent, I' see that some Advent calendars follow the liturgical Advent, so there is at least the option of throwing out all mention of Advent in the December section, and using this code:
Code:
// Liturgical Advent
if(month > admonth - 1){
if (month === admonth && date === addate) dhtml.push("Advent Sunday");
else if((month < 11 && date > addate) || date < 25){
adnames = ['Second', 'Third', 'Fourth', 'Fifth', 'Sixth', 'Seventh', 'Eighth', 'Ninth', 'Tenth', 'Eleventh', 'Twelfth', '13th',
'14th', '15th', '16th', '17th', '18th', '19th', '20th', '21st', '22nd', '23rd', '24th', '25th', '26th', '27th', '28th'];
for(i = 0; i < adnames.length; ++i){
adcal.setDate(addate + 1);
if (month === adcal.getMonth() && date === (addate = adcal.getDate())) dhtml.push(
(adcal.getDay()? '' : adnames[f(i / 6 - 1)] + " Sunday, ") + adnames[i] + " Day of Advent (Liturgical)"
);
}
}
}
That's what I'm including in the update anyway. It gives output like:
Seventh Day of Advent (Liturgical)
or on a Sunday during Advent:
Second Sunday, Eighth Day of Advent (Liturgical)
Bookmarks