Template talk:OutageCounter

From CWCki
Revision as of 01:54, 10 January 2010 by Champthom (talk | contribs) (→‎January 10, 2010 Outage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

how do i shot counter?

Could someone figure out if there's any way we can do a counter for this? Like, have a counter to keep track of days since 17 September 2008 without having to manually change this? --Champthom 02:50, 19 September 2009 (CEST)

  • This seems to be the answer. I know we can do stuff with magic words like {{CURRENTDAY}}, just need to fiddle so I can get it to work so it can calculate since the last day we've had an outage. --Champthom 09:17, 19 September 2009 (CEST)
  • Wikipedia has wikipedia:Template:Age in days, but my head goes spinning every time I see the gigantic load of curly braces and a bunch of {{#expr:}} hackery. In summary: Date arithmetic is for people with greater minds than mine. --wwwwolf (wake me when you need me) 12:43, 19 September 2009 (CEST)
  • I made a working days since calculator and posted a guide of how it works bracketed in <noinclude> tags so it'll show up when anyone looks at the template, but not when the template embedded.--Ror 11:49, 27 September 2009 (CEST)
    • Cool, though this will show rather funny numbers, come January 1st and current day-of-the-year wraps back to 1. I was thinking of similar approach as you did, but as days since epoch (think Julian day numbers. I'm not sure if you can pull that sort of stuff through the incantations. I've just run temporarily out of Geek® what comes to MediaWiki's ParserFunctions so... let me just restate and rephrase: date arithmetic is bitch. --wwwwolf (wake me when you need me) 23:41, 28 September 2009 (CEST)
      • Wow, I just saw that the Wikipedia article does use MW's magic words, so just subtracting the outage's Julian date from current Julian date should be a snap. Let's see... ... ... ::grits his teeth:: Guess what happens when I do {{CURRENTJULIANDAY}}? That's right, nothing happens. A kingdom for a more up-to-date version of MediaWiki! --wwwwolf (wake me when you need me) 23:49, 28 September 2009 (CEST)
      • Year changed, and it predictably blew up. Hmm. Turns out that ParserFunctions' #time magic word does support seconds since Unix epoch (1732219467), so we could do the math using that... --wwwwolf (wake me when you need me) 01:32, 2 January 2010 (CET)

January 10, 2010 Outage

When the hell did THAT happen?! If it was a minor glitch that can be fixed by refreshing, then don't change it! If it lasts for, like five hours, THEN change it!--Blazer 06:29, 10 January 2010 (UTC)

  • Ditto that, my brother. --Champthom 06:54, 10 January 2010 (UTC)