There is no RationalWiki without you. We are a small non-profit with no staff—we are hundreds of volunteers who document pseudoscience and crankery around the world every day. We will never allow ads because we must remain independent. We cannot rely on big donors with corresponding big agendas. We are not the largest website around, but we believe we play an important role in defending truth and objectivity. |
Fighting pseudoscience isn't free. We are 100% user-supported! Help and donate $5, $10, $20 or whatever you can today with ![]() ![]() |
Help talk:How to make a day counter
Sid: could you put a worked example on the page ( 2 versions: nowikied & not nowikied)? 'Cause it's not that clear (to me anyhoo). SusanHelp I'm being haunted by TK 11:42, 7 January 2008 (EST)
- Uhm... I didn't write this help page... but we're using time functionality in Template:Presdays, and it looks just like the stuff in the article...
- {{#time:z}} is the day of the year: 102 (it starts at 0, so today on Jan 7th, it says "6" - this will be important for calculations, depending on what result you expect, see example below)
- And with that, you can count up or down. For example, if you want a timer to count down so that it reaches 0 today, you could count down to it like this:
- {{#expr: (6-{{#time:z}})}} gives: -96
- (Tomorrow, this will likely give "-1" or something as an answer...)
- Likewise, you could count down to Dec 31 (day 366) with {{#expr: (365-{{#time:z}})}} and get 263 as a result.
- Further reading about other time parameters here --Sid 12:04, 7 January 2008 (EST)
Sorry Sid (& Sterile), I had just assumed it was yours. I'll go away for a while & work on it.SusanHelp I'm being haunted by TK 12:14, 7 January 2008 (EST)