ChoralWiki talk:Seasonal music

From ChoralWiki
Jump to: navigation, search

Update guidelines

This is week 03.

Week number calculation is based on the ISO 8601 International Standard:

  • Weeks start on a Monday
  • Weeks are measured W01 to W52/W53
  • W01 is the week containing the 4th of January or, equivalently, the first Thursday of the year
Week numbers for the following years
  2015 2016 2017 2018 2019 2020 2021 2022 2023 2024
January, 1st 01 53 52 01 01 01 53 52 52 01
January, 2nd 01 53 01 01 01 01 53 52 01 01
January, 3rd 01 53 01 01 01 01 53 01 01 01
January, 4th 01 01 01 01 01 01 01 01 01 01
... ... ... ... ... ... ... ... ... ... ...
December, 28 53 52 52 52 52 53 52 52 52 52
December, 29 53 52 52 52 52 53 52 52 52 52
December, 30 53 52 52 52 01 53 52 52 52 01
December, 31 53 52 52 01 01 53 52 52 52 01

There is no need to renumber all entries when the first week of a new year does not coincide with the current week numbering. Just change the line below in the code:

{{#switch: {{#time: W }}

and add (+1) or subtract (-1) a week:

{{#switch: {{#time: W |+1 week}}

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)

I'm not sure about the week number function (53 seems as good as 0 though) which I see days can be counted from, but there's plenty for me to chew on at WP! We want to fill in {{Cat|Pentecost VI|Music for this Sunday, dd Month}} and know OT12/Proper 7 is what Lutherans call the Sunday between June 19 and June 25 inclusive (I made a table at Ordinary Time as well) even though that may not be the 6th Sunday after Pentecost for churches following the old calendar (such choirs tend to be already quite canny though). After Christmas things get messy: sometimes Baptism gets moved to Monday instead of being the first Sunday of OT. Would it be cheating to just fill in Jan 11 for the first Sunday after Epiphany this year? ;-P
Before automation of the calendar through years, we have to create it for this year. It's presently stopped at February, 2nd, a day that's passed. Claude (talk) 16:31, 5 February 2015 (UTC)
Yes Claude, a completely automated system will demand a lot of work, as it seems! In the mean time, a much simpler system can be developed that will just update "Seasonal music" once a week with whatever content had been previously assigned for that week. This can be done pretty fast; then someone will have to select the appropriate content for each week, as I lack the necessary knowledge for it. —Carlos Email.gif 18:36, 5 February 2015 (UTC)
If the much simpler version is set up I'd be happy to keep it going for a few years. Richard Mix (talk) 03:39, 4 March 2015 (UTC)
Richard, the basic automation is up and running; it's really simple, you just have to add the appropriate links for each week, following the example of the ones already added by me. If you need to add more than one link, put one per line, as usual. Thanks, —Carlos Email.gif 04:13, 7 March 2015 (UTC)

Hm! Did something happen to week 49? Richard Mix (talk) 08:50, 13 December 2016 (UTC)