Template:As of: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
m (correct link)
(better handling of deprecated format (for use as meta-template))
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 {{Start date|{{{1}}}|{{#if:{{{2|}}}|{{MONTHNUMBER|{{{2|}}}}}}}|{{{3|}}}|df={{{df|yes}}}}}}}<!--
-->{{#if: {{{alt|}}} | {{{alt}}} | {{#ifeq: {{{lc}}} | {{{lc|}}} | a | A }}s of {{#if: {{{3|}}} | {{Start date | {{{1}}} | {{MONTHNUMBER|{{{2}}}}} | {{{3}}} | df={{{df|yes}}} }} | {{#if: {{{2|}}} | {{MONTHNAME|{{{2}}}}} }} {{{1}}} }}}}<!--


## url inline banner (hidden by default)
## url inline banner (hidden by default)
Line 15: Line 16:


## disable categorisation outside main namespace
## disable categorisation outside main namespace
-->{{main other|<!--
-->{{main other|[[Category:Articles containing potentially dated statements <!--


## temporal category for template (word method)
## hidden link to 'as of' pages (checks for deprecated/incorrect usage)
-->{{#if: {{#ifexpr: {{{1}}} = 1 }} | [[As of {{{1}}}|<s />]] | <!--
-->{{#if: {{#ifexpr: {{{1}}} = 1 }} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 2004 | from {{{1}}} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 1989 | from {{#time:Y|{{{1}}}}} }}}} | <!--


## temporal category for template
## temporal category for template (parameter method)
--> {{#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]] }}}}}}<!--
-->{{#ifexpr: {{{1}}} > 2004 | from {{#if:{{{2|}}} | {{MONTHNAME|{{{2}}}}} }} {{{1}}} | {{#ifexpr:{{{1}}} > 1989 | from {{{1}}} }}}}}} ]]<!--


## global category for template
## global category for template

Revision as of 20:05, August 9, 2008

As of Template:Start date[ref]