ChoralWiki talk:Seasonal music

From ChoralWiki
Revision as of 16:54, 23 January 2015 by Carlos (talk | contribs) (→‎Automation)
Jump to navigation Jump to search

Automation

Last Fall I made a bunch of entries of the form --> *[[:Category:Advent IV|Music for this Sunday, December 21]] <-- and fora while was updating Sunday nights by manually moving the commenting out brackets. One stage of automating things would be to have precoded entries advance at midnight on Sunday; another would be to have the date automatically supplied from the year's calendar; a third layer of complexity is dealing with the date of Easter! Any thoughts? Richard Mix (talk) 04:08, 22 January 2015 (UTC)

Hi Richard. The first case is very simple to implement, I'll add the code for one or two sundays so you may have an idea of how it works. For specific dates it would work in a similar fashion. For Easter, things complicate a lot because of the various calculations involved, but it's not totally impossible to implement. Maybe for this specific case, it would be easier to add the dates by hand, since it's done just once a year. —Carlos Email.gif 15:57, 22 January 2015 (UTC)

Richard, using the week number function to select the appropriate Sunday revealed to be not as simple as I expected: please have a look at ChoralWiki:Seasonal music/Sandbox. It seems that not all years start in week "01" (e.g., 2016 starts as week 53 of 2015, quite strange!). The week numbers here also do not coincide with the week numbers of the w:Ordinary Time (see table in that page). It seems that I'll have to start the week calculation from scratch, basing myself on that Wikipedia article. A function that calculates the Easter day will also be necessary. I had a look at the way that the Easter date is calculated on Wikipedia, and it's a bit confusing. Unfortunately there isn't a template there that could be imported into CPDL without having to go through a large rewriting of the code. I'll keep you informed of any updates. —Carlos Email.gif 16:54, 23 January 2015 (UTC)