Help talk:Extension:ParserFunctions/2014-2020

#time
Why is it that the time function y only works for years before 2000? For example,   yields 08 (currently, when the year changes to 2009 presumably it will yield 09 at that point) when it should yield 02. This is very frustrating when trying to construct things utilizing dates with 2 digits. It doesn't seem to matter for 1999 and before, though. Examples:   yields   yields   yields   yields Thanks for any help that anyone may be able to provide. I had no idea where to post this question, but hopefully this is the right spot. 24.236.101.233
 * Also, I edit mainly on wikipedia (sorry for not having a username here). If/when this is fixed, would it automatically update on wikipedia or not? Sorry, I didn't know how that worked. Thanks again for any info anyone might be able to provide. 24.236.101.233 09:52, 30 December 2008 (UTC)
 * The problem is that if you use  , you get, like for    . i Alex  12:56, 30 December 2008 (UTC)
 * You just need to make the date look more like a date. A 4 digit number staring with a 2 isn't enough. Try:  or  . See strtotime. Splarka 21:35, 30 December 2008 (UTC)
 * It is possible with some minor limitations to use #time for specifying dates from -6999BCE to 6999CE. It requires some template hackery to bypass normal limitations of #time, but it is possible to do.  One limitation is that there is no way of recognizing the precision the editor intended for certain dates and times.  EG: if seconds were specified as 00, there is no way (that I have come up with yet) to tell if the user simply omitted the seconds because they didn't measure with that precision.  For example of the lengths I had to go to in order to get this functionality, see code at .  (Note- you won't be able to see the results of the calculations from preview- the easiest way to see the UTC value emitted is to turn off CSS, eg, Opera View.Style.User mode.  Look for the UTZ value in parens following the visible date-time.) -J JMesserly 20:05, 17 February 2009 (UTC)

#switch
Quote from help: ''It is possible to have 'fall through' values, where several case strings return the same result string. This minimises duplication.'' — It doesn't seem to work for me. Instead, an empty string is returned for cases where right-hand side is emty. --Lozman 14:19, 3 January 2009 (UTC)


 * I fixed the description.--Patrick 10:20, 4 January 2009 (UTC)


 * Thanks a lot! Now it works OK. --Lozman 11:11, 4 January 2009 (UTC)

I have used #switch to return one string at and a different one at. This works very well, however one of my strings had a leading space. This was not parsed correctly, the space was ignored. I have had to precede it with a line break for it to work. 213.126.244.228 14:36, 17 February 2009 (UTC)

Example for first black president
The above example should change on Jan. 20, 2009. --Ed Poor 20:40, 9 January 2009 (UTC)


 * That won't because there is no Template:Age in days on this wiki, and even if there were, #if only checks nullity. Try something like:
 *  </tt>
 * Splarka 22:45, 9 January 2009 (UTC)

Using #if to call an image and adding attributes
I am trying to use #if to call an image. I don't want this image to link to its source page or anywhere. I think that I can do that by using "|link=" as an attribute but I can't get it to work. Anyone able to help?


 * if:|[[Image:|130px|]]


 * well, this:


 * Works for me, but note that the link= parameter is new to version 1.14 which isn't released yet. Splarka 08:25, 15 January 2009 (UTC)
 * Works for me, but note that the link= parameter is new to version 1.14 which isn't released yet. Splarka 08:25, 15 January 2009 (UTC)
 * Works for me, but note that the link= parameter is new to version 1.14 which isn't released yet. Splarka 08:25, 15 January 2009 (UTC)

Errrrm - so does that mean that I have to wait for 1.14 and upgrade or is there a workaround? I tried it in mine and it didn't work - you can still click on the image and get through to the Image page, which is what I want to disable :(.


 * Only if you want to wait for the quarterly release, if you're ambitious you can Download from SVN to get the latest version. --Tlosk 10:46, 30 January 2009 (UTC)

Move to Help:ParserFunctions
I don't know if anyone else noticed, but Help:Extension: looks ridiculous. I amend that we move this page to the above link. -PatPeter  MediaWiki Support Team  00:23, 18 January 2009 (UTC)


 * I think the distinction can be helpful in that Help: applies to a default installation and Help:Extension: makes clear that the information applies to an added extension. --Tlosk 10:38, 30 January 2009 (UTC)

HTML in #IF statement branches is not rendered as html but as plain text
In this example I want to include or exclude a row of a talbe based on the presence of a passed paramter:

However what happened is the html is renderes as plain text and I get a bunch of HTML code showing up on my page.

How can I prevent this?

Thanks, Pete.
 * See Manual:$wgUseTidy -- Skiz zerz  21:40, 5 February 2009 (UTC)


 * I recommend using wiki-markup instead of HTML:


 * —Sledged (talk) 00:28, 6 February 2009 (UTC)