User:Trevor MacInnis/sandbox/Calendar proposal
From Wikipedia, the free encyclopedia
I've stumbled upon your extremely interesting Template:Current month calendarB and Category:Date math and I have a few questions.
As I understand it Template:MarchCalendar calls Template:MarchCalendar2006 (2006 found by MAGICWORDS) which calls Template:MarchCalendar2006Source directly (no MAGICWORDS).
or:
Template:Calendar calls Template:CalendarSource which calls all the months like Template:MarchCalendar2006Source (2006 by MAGICWORD)
So, I see the usefullness of Template:Calendar and Template:MarchCalendar but after that I think it becomes too much to maintain. There is currently a Template:MarchCalendar2006, 2005, and 2004, and a source template for each March from 2004 to 2025 (I havn't checked but I assume the same is true for all the months). That works out to 12 templates x 21 years = 252 templates (so far) and if someone wants to show a month pre-2004 or post-2006 they have to create (for example) Template:MarchCalendar1894 and Template:MarchCalendar1894Source.
So I guess my question is - Is there a way to streamline this process, perhaps using a Perpetual calendar, to have a set series of templates which can be used in any combination and for any date?
[edit] Relationship tables
The way things currently stand: So, there are 14 templates used for one year. Parent and Child to start and 12 Grandchild for each year. Therefore, to create a calendar usable for each year in the 20th century would require: And for individual months calendars:
So, there are two templates used for each month, the Parent template is used only on pages such as March 1 where it is desireable to see the March of whatever year it happens to be. Therefore, a calendar for each month in the 20th century (and a variable calendar) would require: |
Under my proposed changes the relationship would be: So, again, there are 14 templates used for one year. Parent and Child to start and 12 Grandchild for each year. But to create a calendar usable for each year in the 20th century would only require: Parent and Child + 14 Grandchild for each month. A reduction of 1032 template creations for the 21st century because the Grandchild templates are reusable. Template:Year B 1 is good for January 2005, 1994, 2101, etc. See : Common year starting on Saturday.
So, again there are two templates used for each month, the first template is used only on pages such as March 1 where it is desireable to see the March of whatever year it happens to be. Therefore, a calendar for each month in the 20th century (and a variable calendar) would require: No change there. |
Put another way. To create two calendars to describe 2001 and 2007 would require the following templates under each style:
Year | Calendar | Calendar Source | January | February | March-December |
---|---|---|---|---|---|
2001 | Template:Calendar | Template:CalendarSource | Template:JanuaryCalendar2001Source | Template:FebruaryCalendar2001Source | Template:MarchCal2001Source - Template:DecCal2001Source |
2007 | Template:Calendar | Template:CalendarSource | Template:JanuaryCalendar2007Source | Template:FebruaryCalendar2007Source | Template:MarchCal2007Source - Template:DecCal2007Source |
Total number of distinct templates used: 26 (and the 2001 templates have not yet been created).
Year | Calendar | Calendar Source | January | February | March-December |
---|---|---|---|---|---|
2001 | Template:Calendar | Template:Year G | Template:Year G 1 | Template:Year G 2 | Template:Year G 3 - Template:Year G 12 |
2007 | Template:Calendar | Template:Year G | Template:Year G 1 | Template:Year G 2 | Template:Year G 3 - Year G 12 |
Total number of distinct templates used: 14 (and the 2001 templates have already been created)
[edit] See also
- Perpetual calendar
- Category:Date math
- Common year starting on Monday etc to be updated when this is done
- Help:Formula