Broken if not current month?[edit]
So first of all, this is like the most insane template I've ever seen. The amount of wiki logic that goes into it is just crazy, and I'm not even going to pretend like I understand all of it. It's really impressive! However, I can't seem to get it working when I want to generate a calendar for a different month. The shaded/unshaded cells seem to be off, perhaps hardcoded for only August 2015.
← August
|
September 2024
|
October →
|
|
Sunday
|
Monday
|
Tuesday
|
Wednesday
|
Thursday
|
Friday
|
Saturday
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Any ideas why this could be happening, sunmarsh? --Jake 18:31, August 16, 2015 (EDT)
- Thanks! ^^; The basic template isn't too complicated, it's when I started to add the shading for previous months and the custom text that things got crazy. From the way it's displaying I can see there are several places in the template that need to be adjusted. I'll see what I can do... (talk) 18:57, August 16, 2015 (EDT)
- Don't have time to fix all of this now, but I figured out what the problems are and am basically jotting them down here for later.
- Nested #ifeq statements should assign previous month dates in descending order.
- Template needs to check whether cell should be shaded light before shading dark.
- Wiki logic seems to generate day names for dates a month doesn't necessarily have. (e.g. if September had 31 days in 2015 it would fall on a Thursday). I need to have the template check the amount of days in the current month before entering a date for the possible last day of the month (dates 28-31). (talk) 19:26, August 16, 2015 (EDT)
- Just wanted to say: this has got to be one of the coolest and most impressive templates I've seen. You never cease to amaze. ~SuperHamster Talk 21:41, August 16, 2015 (EDT)
- Jeezus, SuperHamster and Jake, you guys are right. :D ™ 22:34, August 16, 2015 (EDT)
- It's so complicated that it actually broke the diff. I've never seen that happen before. --Jake 22:47, August 16, 2015 (EDT)
- Just a little update on these issues: I've corrected all of the problems with the wrong dates being displayed, however there are still issues with shading in months that have less than 31 days. I also realized while I was fixing these issues that the template will generate an extra week for February if the month begins on Sunday and it is not a leap year. I've generated the code to fix this, but will wait until I've fixed other issues first before applying it, as it requires I reformat some existing code. Hopefully I'll have everything finished tomorrow. (talk) 22:53, August 18, 2015 (EDT)
- Everything should work now. I've done a little bit of testing and it's displaying correctly for all of the months in this year. If you spot any other errors let me know. (talk) 12:10, August 19, 2015 (EDT)
Color issue with previous/next month dates[edit]
This is a note to myself, but also worth posting so all are aware:
- This template makes use of four shades of colors, the ColorPrimary and ColorSecondary colors as well as two other shades that were variants of ColorPrimary and ColorSecondary at the time of this template's creation. As the site's seasonal theme has changed, so have ColorPrimary and ColorSecondary. For this reason, the colors that are hard-coded into the template are not playing nicely with the updated ColorPrimary and ColorSecondary colors. I'll be changing this template to use only ColorPrimary and ColorSecondary (and black and white) within the next few weeks so that the calendar colors will continue to display properly in the future. (Also there's something up with the February 2019 calendar... gotta look into that.) - unsigned comment from Sunmarsh (talk • contribs)