Changes

Jump to navigation Jump to search
Imported page
<!--
;Diagnostics for [[Template:Year in country category/inner core/sandbox]]
* year = {{{year}}}
* country = {{{country}}}
* prefix = {{{prefix}}}
* continent = {{{continent}}}
* continent2 = {{{continent2}}}
* continent3 = {{{continent3}}}
* continent4 = {{{continent4}}}
* newname = {{{newname}}}
* newnamestart = {{{newnamestart}}}
* nocountrycentury = {{{nocountrycentury}}}
* min = {{{min}}}
* max = {{{max}}}
* nocat = {{{nocat}}}

Is newnamestart >= year? {{#ifexpr: {{{newnamestart}}} >= {{{year}}}|yes|no}}

* Calcs
**<code><nowiki>{{#expr: floor({{{year}}}/10)}}</nowiki></code> = {{#expr: floor({{{year}}}/10)}}
**<code><nowiki>{{#expr: floor({{{newnamestart}}}/10)}}</nowiki></code> = {{#expr: floor({{{newnamestart}}}/10)}}
**<code><nowiki>{{#ifexpr: {{#expr: floor({{{year}}}/10)}} >= {{#expr: floor({{{newnamestart}}}/10)}}|Yes|No}}</nowiki></code> = {{#ifexpr: {{#expr: floor({{{year}}}/10)}} >= {{#expr: floor({{{newnamestart}}}/10)}}|Yes|No}}
---
--><includeonly><!--
# Portals
-->{{YearInCountryPortalBox|{{{country}}}|{{{prefix}}} {{{country}}}|year={{{year}}}}}<!--


######## BEGIN header text
# link to country needs some trickery
-->This [[Help:Category|category]] is for topics specifically related to the year '''[[{{{year}}}]]''' in <!--
-->{{#ifeq:{{{prefix}}}|<!--
-->|<!-- # no prefix, so this is simple
-->'''[[{{#if: {{{countrydab}}} | {{{countrydab}}} | {{{country}}}}}|{{{country}}}]]'''<!--
-->|<!-- # we have a prefix, so need to strip any leading "the"
-->{{#ifeq: {{#invoke:String|match|s={{{prefix}}}|pattern=^the ?|start=1|match=1|plain=false|nomatch=%%nomatch%%}}|%%nomatch%%<!--
-->|<!-- prefix does not begin with "the"
-->'''[[{{{prefix}}} {{{country}}}]]'''<!--
-->|<!-- prefix begins with "the"
-->the '''[[{{#invoke:String|replace|source={{{prefix}}}|pattern=^the ?(.*)$|replace=%1|count=1|plain=false}} {{{country}}}]]'''<!--
-->}}<!--
-->}}<!--
# link to main article, but only if it exists
-->{{#ifexist:{{{year}}} in {{{prefix}}} {{{country}}}|<br />Main article: '''[[{{{year}}} in {{{prefix}}} {{{country}}}]]'''}}<!--

######## END header text



######## Begin navigation
-->{{Navseasoncats|min={{{min}}}|max={{{max}}}}}<!--
# Add a note about any change of name after the current year
-->{{#if: {{{newname}}}<!--
-->|{{#ifexpr: {{{newnamestart}}} >= {{{year}}}<!--
-->|'''Note''': in {{{newnamestart}}}, {{{prefix}}} {{{country}}} was renamed to '''[[{{{newname}}}]]'''.<!--
-->}}<!--
-->}}<!--
######## END navigation


######## BEGIN categories

-->{{#ifeq: {{{nocat}}}|yes<!--
-->|<!-- nocat=yes, so no categories
-->|<!-- do categories -->

{{#ifexist: Category:{{{year}}} by country<!--
-->|[[Category:{{{year}}} by country{{!}}{{{country}}}]]<!--
-->}}<!--

## Use "Category:Years of the nth century in CountryName" unless the ##
## parameter "nocountrycentury" is explicitly set to yes ##
## Then we use "Category:Years in CountryName" ##
## ##
## Also factor in the use of "newname" ##

-->[[Category:Years &#32;<!--
-->{{#ifeq: {{{nocountrycentury}}}|yes<!--
-->| in <!--
-->| of the {{Century name from decade or year|{{{year}}}}} in <!--
-->}}<!--
-->&#32;<!-- make sure there is a space before country
-->{{#if: {{{newnamestart}}}<!--
-->|<!--
# There is a new name for the country
# Now test whether this year is the same century as the namechange:
# -- If same, use {{{newname}}}
# -- otherwise use {{{prefix}}} {{{country}}}
-->{{#ifexpr: {{#expr: floor(({{{year}}} -1)/100)}} = {{#expr: floor({{{newnamestart}}}/100)}}<!--
--->|{{{newname}}}<!-- current year in same century as name change, or later
-->|{{{prefix}}} {{{country}}}<!-- current year is in a century before decade of name change
-->}}<!--
-->|<!--
# There was no name change, or it didn't happen in this century
-->{{{prefix}}} {{{country}}}<!--
-->}}<!--
-->{{!}}{{{year}}}]]<!--

# For the "Category:YYY0s in country", some trickery is required where a country has changed name
# We use the new name if
# 1/ There is a new name
# 2/ the new name was adopted in the same decade as the current year
-->[[Category:{{DECADE|{{{year}}}}} in &#32;<!--
-->{{#if: {{{newname}}}<!--
-->|<!--
# There is a new name.
# Now test whether this year is the same decade as the name change:
# -- If same, use {{{newname}}}
# -- otherwise use {{{prefix}}} {{{country}}}
-->{{#ifexpr: {{#expr: floor({{{year}}}/10)}} >= {{#expr: floor({{{newnamestart}}}/10)}}<!--
--->|{{{newname}}}<!-- current year in same decade as name change, or later
-->|{{{prefix}}} {{{country}}}<!-- current year is in a decade before decade of name change
-->}}<!--
-->|<!--
# There was no name change, or it didn't happen in this decade
-->{{{prefix}}} {{{country}}}<!--
-->}}<!--
-->{{!}}{{{year}}}]]<!--
-->[[Category:{{{year}}} in {{{continent1}}}|{{{country}}}]]<!--
-->{{#if:{{{continent2}}}<!--
-->|[[Category:{{{year}}} in {{CountryPrefixThe|{{{continent2}}}}}{{!}}{{{country}}}]]<!--
-->}}<!--
-->{{#if:{{{continent3}}}<!--
-->|[[Category:{{{year}}} in {{CountryPrefixThe|{{{continent3}}}}}{{!}}{{{country}}}]]<!--
-->}}<!--
-->{{#if:{{{continent4}}}<!--
-->|[[Category:{{{year}}} in {{CountryPrefixThe|{{{continent4}}}}}{{!}}{{{country}}}]]<!--
-->}}<!--

-->}}<!-- # Closing braces for the nocat


######## END categories
-->__NOGALLERY__<!--
--></includeonly><noinclude>
{{Documentation|content=This is a sub-template of [[Template:{{ROOTPAGENAME}}]]}}
</noinclude>
Bureaucrats, Check users, editor, emailconfirmed, Interface administrators, reviewer, smwadministrator, smwcurator, smweditor, Suppressors, Administrators
12,798

edits

Navigation menu