Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:As of: Difference between revisions

Template page
WP:GLOBALIZE: allow usage of a neutral "mdy" switch for month-day-year format, for countries which are not the USA
 
New template, same name
Tag: Replaced
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<!--{{As of}} begin--><includeonly><!--
<includeonly>[[Category:As of {{{1}}}]]</includeonly><noinclude>
Add this template to the top of a page to mark when it was last updated.
<pre>{{as of|{{{1}}}</pre>


## param 1 is the year
[[Category:DemocracyCraft Wiki templates]]</noinclude>
## optional param 2 is the month
## optional param 3 is the day of the month
## optional named parameter alt=[text] is alternative display text (may include wiki markup)
## optional named parameter df=mdy or df=US produces month-day-year 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}}} | {{#if:{{{bare|}}}||{{#if:{{yesno|{{{since|}}}}}|{{#if: {{yesno|{{{lc|}}}}} | s | S }}ince | {{#if: {{yesno|{{{lc|}}}}} | a | A }}s of}}}} {{#if:{{{pre|}}}|{{{pre}}}&#32;}}{{#if: {{{3|}}} | {{#switch:{{lc:{{{df|}}}}}|us|mdy={{MONTHNAME|{{{2}}}}}&nbsp;{{#expr:{{{3}}}}},&#32;|{{#expr:{{{3}}}}}&nbsp;{{MONTHNAME|{{{2}}}}}&nbsp;}}{{{1}}}|{{#if: {{{2|}}} |{{MONTHNAME|{{{2}}}}}&nbsp;}}{{{1}}}}}}}{{#if:{{{post|}}}|<nowiki />{{{post}}}}}<!--
#### That nowiki is required or, various characters (:, ;, #, and *} will be parsed as wikisyntax for list items.
## ref/update inline banner (hidden by default)
--><sup class="plainlinks noexcerpt noprint asof-tag {{#if:{{{url|}}}|ref|update}}" style="display:none;">[{{#if:{{{url|}}}|{{{url}}} &#91;ref&#93;|{{fullurl:{{PAGENAME}}|action=edit}} &#91;update&#93;}}]</sup><!--
 
## categorisation disabled outside main namespace
-->{{Dated maintenance category (articles)|Articles containing potentially dated statements|from|<!--
 
## temporal category for template (word method)
-->{{#if: {{#ifexpr: {{{1}}} = 1 }} |{{#ifexpr:{{#time:U|{{{1}}}}} > {{#time:U}} | the future | {{#ifexpr: {{#time:Y|{{{1}}}}} > 2004 | {{{1}}} | {{#ifexpr: {{#time:Y|{{{1}}}}} > 1989 | {{#time:Y|{{{1}}}}} | before 1990 }}}}}} |<!--
 
## temporal category for template (parameter method)
-->{{#ifexpr: {{{1}}} > 2004 | {{#ifexpr:{{#time:U|{{#if:{{{2|}}} | {{MONTHNAME|{{{2}}}}}}} {{{1}}}}} > {{#time:U}} | the future| {{#if:{{{2|}}} | {{MONTHNAME|{{{2}}}}} }} {{{1}}}}} | {{#ifexpr:{{{1}}} > 1989 | {{{1}}} | before 1990 }}}}}}|<!--
 
## 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 &#91;ref&#93;]</sup>
 
{{documentation}}
 
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
 
</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 | bare | df | lc | post | pre | since | url }}

Latest revision as of 03:02, 24 December 2025

Add this template to the top of a page to mark when it was last updated.

{{as of|{{{1}}}