Difference between revisions of "Template:New"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
<onlyinclude>{{#ifexpr:{{CURRENTTIMESTAMP}} < {{{expiry|99999999}}}*1000000 | [[File:New_tag.png|20px]] | }}</onlyinclude> | <onlyinclude>{{#ifexpr:{{CURRENTTIMESTAMP}} < {{{expiry|99999999}}}*1000000 | [[File:New_tag.png|20px]] | }}</onlyinclude> | ||
=== Usage === | |||
Displays a [[File:New_tag.png|20px]] icon if the current date is before the expiry date defined in the <code>expiry</code> template parameter. | |||
The expiry date parameter is a single number defined in the form of YYYYMMDD. For example, an expiry date of <code>November 4, 2012</code> would be <code>20121104</code>. | |||
If no expiry date is provided, <code>expiry</code> defaults to <code>99999999</code>, effectively negating an expiry date for the display of the [[File:New_tag.png|20px]] tag. | |||
==== Example ==== | |||
To create a "NEW!" tag that expires on August 18, 2014, insert the following code into your document: | |||
<code><nowiki>{{New|expiry=20140818}}</nowiki></code> |
Revision as of 16:07, 4 December 2012
Usage
Displays a icon if the current date is before the expiry date defined in the expiry
template parameter.
The expiry date parameter is a single number defined in the form of YYYYMMDD. For example, an expiry date of November 4, 2012
would be 20121104
.
If no expiry date is provided, expiry
defaults to 99999999
, effectively negating an expiry date for the display of the tag.
Example
To create a "NEW!" tag that expires on August 18, 2014, insert the following code into your document:
{{New|expiry=20140818}}