Template:As of: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
m (bug fixes) |
m (58 revisions imported from wikipedia:Template:As_of) |
||
(42 intermediate revisions by 19 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly><!-- |
<!--{{As of}} begin--><includeonly><!-- |
||
## param 1 is the year |
## param 1 is the year |
||
## optional param 2 is the month |
## optional param 2 is the month |
||
## optional param 3 is the day of the month |
## optional param 3 is the day of the month |
||
Line 7: | Line 7: | ||
## optional named parameter df=US produces American date format in displayed text |
## optional named parameter df=US produces American date format in displayed text |
||
## optional named parameter lc=on gives lower-case-first output |
## optional named parameter lc=on gives lower-case-first output |
||
## optional named parameter url=[URL] gives statement reference |
|||
## displayed text ([A/a]s of [Start date] by default) |
## displayed text ([A/a]s of [Start date] by default) |
||
-->{{#if:{{{alt|}}}|{{{alt}}}|{{#ifeq:{{{lc}}}|{{{lc|}}}|a|A}}s of {{ |
-->{{#if: {{{alt|}}} | {{{alt}}} | {{#if:{{{since|}}}|{{#ifeq: {{{lc}}} | {{{lc|}}} | s | S }}ince | {{#ifeq: {{{lc}}} | {{{lc|}}} | a | A }}s of}} {{#if:{{{pre|}}}|{{{pre}}} }}{{#if: {{{3|}}} | {{#ifeq:{{lc:{{{df|}}}}}|us|{{MONTHNAME|{{{2}}}}} {{#expr:{{{3}}}}}, |{{#expr:{{{3}}}}} {{MONTHNAME|{{{2}}}}} }}{{{1}}}|{{#if: {{{2|}}} |{{MONTHNAME|{{{2}}}}} }}{{{1}}}}}}}{{#if:{{{post|}}}|<nowiki />{{{post}}}}}<!-- |
||
#### That nowiki is required or, various characters (:, ;, #, and *} will be parsed as wikisyntax for list items. |
|||
⚫ | |||
--><sup class="plainlinks noexcerpt noprint asof-tag {{#if:{{{url|}}}|ref|update}}" style="display:none;">[{{#if:{{{url|}}}|{{{url}}} [ref]|{{fullurl:{{PAGENAME}}|action=edit}} [update]}}]</sup><!-- |
|||
⚫ | |||
⚫ | |||
-->{{DMCA|Articles containing potentially dated statements|from|<!-- |
|||
-->{{#if:{{{url|}}}|<sup class="plainlinks asof-tag" style="display:none;">[http://{{{url}}} [url]]</sup>}}<!-- |
|||
⚫ | |||
⚫ | |||
-->{{#if: {{#ifexpr: {{{1}}} = 1 }} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 2004 | {{{1}}} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 1989 | {{#time:Y|{{{1}}}}} | before 1990 }}}} | <!-- |
|||
-->{{main other|<!-- |
|||
## temporal category for template (parameter method) |
|||
## hidden link to 'as of' pages (checks for deprecated/incorrect usage) |
|||
-->{{# |
-->{{#ifexpr: {{{1}}} > 2004 | {{#if:{{{2|}}} | {{MONTHNAME|{{{2}}}}} }} {{{1}}} | {{#ifexpr:{{{1}}} > 1989 | {{{1}}} | before 1990 }}}}}}|<!-- |
||
⚫ | |||
--> {{#ifexpr: {{{1}}} > 2004 | [[Category:Articles containing potentially dated statements from {{#if:{{{2|}}} | {{MONTHNAME|{{{2}}}}} }} {{{1}}}]] | {{#ifexpr:{{{1}}} > 1989 | [[Category:Articles containing potentially dated statements from {{{1}}}]] | [[Category:Articles containing potentially dated statements]] }}}}}}<!-- |
|||
## global category for template |
## global category for template |
||
--> |
-->All articles containing potentially dated statements}}</includeonly><!--{{As of}} end--><noinclude><!-- |
||
## dynamic example (as of today, self ref) |
|||
-->{{As of|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}<sup class="plainlinks">[https://en.wikipedia.org/wiki/Template:As_of [ref]]</sup> |
|||
{{documentation}} |
|||
⚫ | |||
</noinclude>{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using as of template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:As of]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | 3 | alt | df | lc | post | pre | since | url }} |
|||
⚫ | |||
--></includeonly><noinclude>{{documentation}}</noinclude> |