Changes

Jump to navigation Jump to search
Imported page
<includeonly><!--
# The first step is to check whether this is a category page
-->{{Category other<!--
-->|<!-- ############### It is a category ###############################
# So check that it matches the required format: "YYYY establishments" or "YYYY disestablishments"
# No regexes, so check separately for "establishments" and "disestablishments"
# In each case, the find function returns 0 for a nomatch, and 1 for a match,
# so we add the two together and take a total of 0 as an error
-->{{#ifeq: {{#expr: {{#invoke:String|find|{{PAGENAME}}|^%d?%d?%d?%d establishments$|plain=false}} + <!--
-->{{#invoke:String|find|{{PAGENAME}}|^%d?%d?%d?%d disestablishments$|plain=false}} }}<!--
-->|0<!--
-->|<!-- # Doesn't match
-->{{Error|Invalid page name.<br />[[Template:(Dis)establishments in year category header]] is for use only on category pages whose title is of the form {{nowrap|"YYYY&nbsp;establishments"}} or {{nowrap|"YYYY&nbsp;disestablishments"}}, where YYYY is an AD year (e.g. "2", "63", "815" or "1972"}}<!--
-->[[Category:Errors reported by other category header templates]]<!--
-->|<!--
-->{{(Dis)establishments in year category header/core<!--
-->|year={{#invoke:String|replace|{{PAGENAME}}|pattern=^(%d?%d?%d?%d) (d?i?s?establishments)$|%1|1|false}}<!--
-->|type={{#invoke:String|replace|{{PAGENAME}}|pattern=^(%d?%d?%d?%d) (d?i?s?establishments)$|%2|1|false}}<!--
-->}}<!--
-->}}<!--
-->|<!-- ############### Not a category ###############################
-->{{Error|This page is not in the [[Wikipedia:Namespace|category namespace]].<br />[[Template:(Dis)establishments in year category header]] is for use only on category pages whose title is of the form {{nowrap|"YYYY&nbsp;establishments"}} or {{nowrap|"YYYY&nbsp;disestablishments"}}, where YYYY is an AD year (e.g. "2", "63", "815" or "1972"}}<!--

-->[[Category:Errors reported by other category header templates]]<!--
-->}}</includeonly><!--
# Note {{CatAutoTOC}} needs to be available whether or not this template page has been transcluded
-->{{CatAutoTOC}}<!--
--><noinclude><!--
-->{{Documentation|content=<!--
-->To make a category of the form "YYYY establishments" or "YYYY disestablishments", where YYYY is a year

e.g.
* [[:Category:6 establishments]]
* [[:Category:95 establishments]]
* [[:Category:727 establishments]]
* [[:Category:1842 establishments]]
* [[:Category:9 disestablishments]]
* [[:Category:46 disestablishments]]
* [[:Category:525 disestablishments]]
* [[:Category:2013 disestablishments]]

==Usage==
<code><nowiki>{{(Dis)establishments in year category header}}</nowiki></code>

No parameters needed
== See also ==
* [[Template:(Dis)establishments in decade category header]]
}}
[[Category:Establishments-and-disestablishments-by-year dual-purpose templates| ]]
</noinclude>
Bureaucrats, Check users, editor, emailconfirmed, Interface administrators, reviewer, smwadministrator, smwcurator, smweditor, Suppressors, Administrators
12,798

edits

Navigation menu