Template:As of: Difference between revisions

111 bytes added ,  15 years ago
better handling of deprecated format (for use as meta-template)
m (correct link)
(better handling of deprecated format (for use as meta-template))
Line 7:
## 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 url=[URL] gives statement reference
 
## displayed text ([A/a]s of [Start date] by default)
-->{{#if: {{{alt|}}} | {{{alt}}} | {{#ifeq: {{{lc}}} | {{{lc|}}} | a | A }}s of {{Start#if: date|{{{13|}}} | {{#if:Start date | {{{2|1}}} | {{MONTHNUMBER|{{{2|}}}}}}} | {{{3|}}} | df={{{df|yes}}} }} | {{#if: {{{2|}}} | {{MONTHNAME|{{{2}}}}} }} {{{1}}} }}}}<!--
 
## url inline banner (hidden by default)
Line 15 ⟶ 16:
 
## disable categorisation outside main namespace
-->{{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{{#ifexpr: of{{#time:Y|{{{1}}}}} > 2004 | from {{{1}}} |<s /{{#ifexpr: {{#time:Y|{{{1}}}}} >]] 1989 | from {{#time:Y|{{{1}}}}} }}}} | <!--
 
## 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]] }}}}}} ]]<!--
 
## global category for template
Anonymous user