Changes

Jump to navigation Jump to search
Mismatched formatting repaired
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
== Usage ==
This template generates an abbreviation for ''reign'' (or the Latin ''{{lang|la|rexit}}''): {{Reign}}

'''Typical example''':
* <code><nowiki>Emperor [[Augustus]] of [[Roman Empire|Rome]] ({{reign|27 BCE|14 CE}})</nowiki></code>
produces:
* Emperor [[Augustus]] of [[Roman Empire|Rome]] ({{reign|27 BCE|14 CE}})

=== Default output ===
* With no parameters and two values, the display is:
** with simple values (en dash is not spaced): <code><nowiki>{{reign|1962|present}}</nowiki></code> → {{reign|1962|present}}
** with one or more complex values (containing whitespace; en dash is spaced): <code><nowiki>{{reign|c. 23 BCE|5 CE}}</nowiki></code> → {{reign|c. 23 BCE|5 CE}}
** with only a start date: <code><nowiki>{{reign|1962}}</nowiki></code> → {{reign|1962}} (This usage is {{!bxt|deprecated}}; use "present" to indicate an ongoing time span, per [[MOS:DATERANGE]] – leaving it blank looks like an error.)
In all such cases, the following is true:
# The "{{reign}}" is marked up with {{tag|abbr}} to provide a mouse-over tooltip that explains that the abbreviation means "reign"
# The space after the "{{reign}}" and any between dates and dash are non-breaking spaces, while the values of the date parameters are also non-breaking, in case they contain any spaces. I.e., no line-wrapping will occur anywhere within "{{reign|c. 23 BCE|5 CE}}".

Additional notes:
* If a blank first date is given, a "?" will be generated for it: <code><nowiki>{{reign||732}}</nowiki></code> produces "{{reign||732}}", and <code><nowiki>{{reign||c. 732}}</nowiki></code> produces "{{reign||c. 732}}"
* Legacy use ({{!bxt|deprecated}}): If the template is used with no values, it simply outputs the marked-up "{{reign}}" Given something like <code><nowiki>{{reign}} 1962–present</nowiki></code>, a line wrap may occur between the "{{reign}}" and the first date unless a non-breaking space is used.
* This template does not do any date error checking like that performed by the citation templates. If you input "Ferberary 38, 200017", this will be the output.

=== Parameters ===
* {{para|1}} or first unnamed parameter – Start date, e.g. "1935", "{{abbr|c|circa}}. 1205", "37 BCE", "August 1434", "January 1, 2017".
* {{para|2}} or second unnamed parameter – End date, e.g. "present", or any of the sorts of dates used in {{para|1}}
* {{para|3}} or third unnamed parameter – Start date of second range.
* {{para|4}} or fourth unnamed parameter - End date of second range.
** The template only supports two date ranges (plus individual dates, see below). It can be extended fairly easily to support more if necessary.
** The {{para|3}} and {{para|4}} parameters do not work in the absence of {{para|2}}.
* {{para|single}} – A single date (typically a year) for a short reign, where no range is needed. Using <code><nowiki>{{reign|single=1872}}</nowiki></code> avoids the redundant "{{reign|1872|1872}}" and emits "{{reign|single=1872}}". <small>(This is actually an alias of the {{para|post-date}} parameter.)</small>
* {{para|show}} a.k.a. {{para|link}} a.k.a {{para|lk}} – Controls formatting of the "r.":
** {{para|show|none}} – Produces no tooltip or link: "{{Reign}}"; intended for use at second and later occurrences. This can also be done with other negative values such as <kbd>no</kbd>, <kbd>n</kbd>, <kbd>off</kbd>, <kbd>false</kbd>, <kbd>0</kbd>.
** {{para|show|link}} – Replaces the {{tag|abbr|o}} markup with a link to the [[Reign]] article: "{{Reign|show=link}}"; {{em|rarely needed, per [[MOS:OVERLINKING]]}}. This can also be done with positive values such as <kbd>yes</kbd>, <kbd>y</kbd>, <kbd>on</kbd>, <kbd>true</kbd>, <kbd>1</kbd>
** <del>{{para|show|abbr}}</del> – {{!bxt|Deprecated}}; shows "r." with {{tag|abbr|o}} markup, with is already the default output; this parameter does not need to be used.
* {{para|pre-date}} – A single date to appear before the date range (a comma-space will be inserted between them). This parameter can be "cheated" to show multiple dates in series, e.g. {{para|pre-date|1645, 1652}}
* {{para|post-date}} – Same as {{para|pre-date}}, but appears after the date range. <small>({{para|single}} is an alias of this parameter, which is coded to not emit a comma-space if used as the only date.)</small>
** Use these two parameters to specify independent years rather than a range, for two short, non-contiguous terms in office: <code><nowiki>{{reign|pre-date=1732|post-date=1735}}</nowiki></code> → {{reign|pre-date=1732|post-date=1735}}
** {{em|Warning}}: These two parameters are included within the non-wrapping span; if you misuse them to insert long-winded annotations instead of dates this will cause display problems if you do not turn on {{para|wrap|yes}}.
* {{para|mid-date}} – A single date to appear between the {{para|1}}{{para|2}} and {{para|3}}{{para|4}} date ranges. As with the former two parameters, it can be "cheated" to show multiple dates in series.
* {{para|era}} – Gives the "era" at the end. Used (typically with [[Common Era|BCE]] or [[Anno domini|BC]], and without links after first occurrence) when the era must be specified and both/all dates are simple and {{em|within the same era}}. E.g., <code><nowiki>{{reign|89|67|era=[[Common Era|BCE]]}}</nowiki></code> produces "{{reign|89|67|era=[[Common Era|BCE]]}}" (while <code><nowiki>{{reign|89|67 BCE}}</nowiki></code> produces the incorrectly spaced "{{reign|89|67 BCE}}").
** When either or both dates contain whitespace, this parameter is optional and harmless (and correctly produces the spaced en dash); <code><nowiki>{{reign|89|c. 67|era=BCE}}</nowiki></code> yields "{{reign|89|c. 67|era=BCE}}" which is identical to the output of <code><nowiki>{{reign|89|c. 67 BCE}}</nowiki></code>: "{{reign|89|c. 67 BCE}}".
** This parameter can also be used for a year, when followed by various months as the dates; it is not really limited to "eras" in the vast sense.
* There is no parameter for front-loading both dates with "c.", "AD", or another value. This is because:
** "c." applies to a specific date: "c. 89 – 67 BCE" means "from approximately 89 BCE to definitely 67 BCE". To express that both dates are approximate, use <code><nowiki>{{reign|c. 89|c. 67 BCE}}</nowiki></code> or <code><nowiki>{{reign|c. 89|c. 67|BCE}}</nowiki></code>.
** "[[Anno domini|AD]]", when needed (usually only for perhaps confusingly short dates like "9" and "32") is given {{em|after}} the date on Wikipedia, as in most other academic publications; the {{!xt|AD 32}} style is not used here.
* {{para|wrap|yes}} – Permits the content to line-wrap at key points (right after a comma, i.e. between two date ranges, between {{para|pre-date}} and {{para|1}}, between the late range date and {{para|post-date}}). Any value supplied to {{para|wrap}} will turn this option on. Does {{em|not}} permit wrapping within a date range, or between the "{{reign}}" (or replacement wording provided by {{para|show}} options) and the first date, or between the last date and {{para|era}}.

==== For use in tables and such ====
Some of these could also be used, for clarity, in lead sections of articles that are confusingly thick with abbreviations and other markup.
* {{para|show}} a.k.a. {{para|link}} a.k.a. {{para|lk}} – Can be used to replace the "r.":
** {{para|show|word}} – Uses the word "reigned" instead of "r.": {{reign|show=word}}
** {{para|show|colon}} – Uses the word "reign", followed by a colon, instead of "r.": {{reign|show=colon}}
** {{para|show|lword}} – Same as {{para|show|word}}, but with a link to [[Reign]] article: {{reign|show=lword}}
** {{para|show|lcolon}} – Same as {{para|show|colon}}, but with a link to [[Reign]] article: {{reign|show=lcolon}}
** {{para|show|blank}} – Shows nothing but the date values and dash, for use in tables and infoboxes with a header that already says this data indicates the reign.
* {{para|cap|yes}} – Capitalizes the r./reigned/reign text, for use in lists and such. {{em|This should never be used in mid-sentence in regular text.}} Any value supplied to {{para|cap}} will turn this option on. Examples:
** {{para|cap|y}} alone – {{reign|cap=y}}
** {{para|cap|y}}{{para|show|none}} → {{reign|cap=y|show=none}}
** {{para|cap|y}}{{para|show|link}} → {{reign|cap=y|show=link}}
** {{para|cap|y}}{{para|show|word}} →{{reign|cap=y|show=word}}
** {{para|cap|y}}{{para|show|colon}} → {{reign|cap=y|show=colon}}
** {{para|cap|y}}{{para|show|lword}} → {{reign|cap=y|show=lword}}
** {{para|cap|y}}{{para|show|lcolon}} → {{reign|cap=y|show=lcolon}}
* {{para|sortable}} – Only for use in [[Help:Sorting|sortable tables]] {{crossref|(see [[#Notes on table sorting|below]] for pros and cons of using thing). Uses as a sort key the value of {{para|sort_date}} – or, if that was not specified, the value of one of the following, in descending order of precedence: {{para|single}}, {{para|pre-date}}, {{para|1}}, {{para|2}}, {{para|post-date}}; at least one such date must be specified for this to work.
* {{para|sort_date}} – Provide a custom date to sort by, e.g. ISO {{var|yyyy}}-{{var|mm}}-{{var|dd}} format, or "-43" for "43 BCE", or "983" for "c. 983". This parameter may also be spelled {{para|sortdate}} or {{para|sort-date}}.

==== For use in non-royalty contexts ====
* {{para|label}} – Free-form parameter for replacing "{{reign}}" with some other word or phrase. Overrides any {{para|show}} or {{para|cap}} values. Examples:
** {{para|label|in office}} → {{reign|label=in office}}
** {{para|label|<nowiki>[[World Snooker Championship|World Champion]]:</nowiki>}} → {{reign|label=[[World Snooker Championship|World Champion]]:}}
** Doing <code><nowiki>{{reign|1653|1658|label=ruled}}</nowiki></code> is effectively synonymous with doing something like <code><nowiki>ruled {{reign|1653|1658|show=blank}}</nowiki></code>, but the former has the virtue of being more concise and grouping the label into the template, in case it needs to be moved.
** If {{para|wrap|yes}}, then content may wrap after {{para|label}}, since its content may be arbitrarily long.
* The aforementioned {{para|show|blank}} can also be used to repurpose this template for all sorts of date and even non-date numeric ranges.

==Notes on table sorting==
{{Circa/doc/sortable}}

==Examples==

{| class="wikitable"
|-
! Code !! Output !! Works?
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}} 1207–1272</nowiki></code> || {{ {{BASEPAGENAME}}}} 1207–1272 || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|1207|1272}}</nowiki></code> || {{ {{BASEPAGENAME}}|1207|1272}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1 October 1207 |1272}}</nowiki></code> || {{ {{BASEPAGENAME}} |1 October 1207 |1272}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1 October 1207 |16 November 1272}}</nowiki></code> || {{ {{BASEPAGENAME}} |1 October 120 |16 November 1272}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1207 |16 November 1272}}</nowiki></code> || {{ {{BASEPAGENAME}} |1207 |16 November 1272}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |c. 1207 |1272}}</nowiki></code> || {{ {{BASEPAGENAME}} |c. 1207 |1272}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1207 |present}}</nowiki></code> || {{ {{BASEPAGENAME}} |1207 |present}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |July 27, 2016 |present}}</nowiki></code> || {{ {{BASEPAGENAME}} |July 27, 2016 |present}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1207 |1272}}</nowiki></code> || {{ {{BASEPAGENAME}} |1207 |1272}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1207| 1272}}</nowiki></code> || {{ {{BASEPAGENAME}} |1207| 1272}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> | 1207 | 1272 }}</nowiki></code> || {{ {{BASEPAGENAME}} | 1207 | 1272 }} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |c.1207 |1272}}</nowiki></code> || {{ {{BASEPAGENAME}} |c.1207 |1272}} || {{cross}}<ref><code>c.1207</code> is invalid style (should be <code>c. 1207</code>), and it consequently is wrongly parsed as a simple date, so the en dash in turn is incorrectly unspaced.</ref>
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1962|present |show=word}}</nowiki></code> || {{ {{BASEPAGENAME}} |1962|present |show=word}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1962|present |show=word |cap=y}}</nowiki></code> || {{ {{BASEPAGENAME}} |1962|present |show=word |cap=y}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1962|present |show=colon}}</nowiki></code> || {{ {{BASEPAGENAME}} |1962|present |show=colon}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1962|present |show=colon |cap=y}}</nowiki></code> || {{ {{BASEPAGENAME}} |1962|present |show=colon |cap=y}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1962|present |show=lword}}</nowiki></code> || {{ {{BASEPAGENAME}} |1962|present |show=lword}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1962|present |show=lword |cap=y}}</nowiki></code> || {{ {{BASEPAGENAME}} |1962|present |show=lword |cap=y}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1962|present |show=lcolon}}</nowiki></code> || {{ {{BASEPAGENAME}} |1962|present |show=lcolon}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1962|present |show=lcolon |cap=y}}</nowiki></code> || {{ {{BASEPAGENAME}} |1962|present |show=lcolon |cap=y}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1962|present |show=blank}}</nowiki></code> || {{ {{BASEPAGENAME}} |1962|present |show=blank}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1985}}</nowiki></code> || {{ {{BASEPAGENAME}} |1985}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> ||c. 320 BC}}</nowiki></code> || {{ {{BASEPAGENAME}} ||c. 320 BC}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> ||940}}</nowiki></code> || {{ {{BASEPAGENAME}} ||940}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki></code> || {{ {{BASEPAGENAME}}}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |89|67 BCE}}</nowiki></code> || {{ {{BASEPAGENAME}} |89|67 BCE}} || {{cross}}<ref><code>89|69 BCE</code> produces a spaced en dash, incorrect in this case because the date range is simple and "BCE" applies to both; this should instead be done with <code>89|69|era=BCE</code>.</ref>
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |89|67 |era=BCE}}</nowiki></code> || {{ {{BASEPAGENAME}} |89|67 |era=BCE}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |c. 89|67 |era=BCE}}</nowiki></code> || {{ {{BASEPAGENAME}} |c. 89 |67 |era=BCE}} || {{tick}}<ref>"{{ {{BASEPAGENAME}} |c. 89|67 |era=BCE}}" is correct because c. (circa) applies only to a single date. Using <code>c. 89–67</code> is invalid, as ambiguous. To show two uncertain dates: "{{ {{BASEPAGENAME}} |c. 89|c. 67 |era=BCE}}".</ref>
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |label=ruled|1967|1969}}</nowiki></code> || {{ {{BASEPAGENAME}} |label=ruled|1967|1969}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |label=[[World Snooker Championship|World Champion]]:|1967|1969}}</nowiki></code> || {{ {{BASEPAGENAME}} |label=[[World Snooker Championship|World Champion]]:|1967|1969}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1267 |1272 |post-date=1275}}</nowiki></code> || {{ {{BASEPAGENAME}} |1267 |1272 |post-date=1275}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |c. 1267 |1272 |post-date=1275}}</nowiki></code> || {{ {{BASEPAGENAME}} |c. 1267 |1272 |post-date=1275}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |pre-date=1265 |1267 |1272 }}</nowiki></code> || {{ {{BASEPAGENAME}} |pre-date=1265 |1267 |1272}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |pre-date=1265 |c. 1267 |1272 |post-date=1275}}</nowiki></code> || {{ {{BASEPAGENAME}} |pre-date=1265 |c. 1267 |1272 |post-date=1275}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |pre-date=c. 54 |43 |post-date=37 |era=BCE}}</nowiki></code> || {{ {{BASEPAGENAME}} |pre-date=c. 54 |43 |post-date=37 |era=BCE}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |pre-date=1265 |post-date=1277}}</nowiki></code> || {{ {{BASEPAGENAME}} |pre-date=1265 |post-date=1277}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |single=43 CE}}</nowiki></code> || {{ {{BASEPAGENAME}} |single=43 CE}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|512|514|520|522}}</nowiki></code> || {{ {{BASEPAGENAME}}|512|514|520|522}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1 May 1995|30 April 1996 |1 May 1999|30 April 2000 |wrap=y}}</nowiki></code> || {{ {{BASEPAGENAME}} |1 May 1995|30 April 1996 |1 May 1999|30 April 2000 |wrap=y}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |pre-date=January |1=March|2=May |3=August|4=September |post-date=November |era=2017 |wrap=y}}</nowiki></code> || {{ {{BASEPAGENAME}} |pre-date=January |1=March|2=May |3=August|4=September |post-date=November |era=2017 |wrap=y}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|512|514|mid-date=517|520|522}}</nowiki></code> || {{ {{BASEPAGENAME}}|512|514|mid-date=517|520|522}} || {{tick}}
|-
| <code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki> |1= 512 |2= 514 | mid-date=517 |3= 520 |4= c. 522 }}</nowiki></code> || {{ {{BASEPAGENAME}} |1= 512 |2= 514 | mid-date=517 |3= 520 |4= c. 522 }} || {{tick}}
|}
{{reflist}}

==Redirects==
{{tlx|Reign}} can be also be called with the redirects:
*{{txl|r.}}
*{{tlx|rexit}}
*{{tlx|ruled}}

==See also==
*{{tlx|circa}}
*{{tlx|floruit}}
*[[Tempore]]

<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox |
| <!----PLEASE ADD CATEGORIES BELOW THIS LINE:---->
[[Category:Time, date and calendar templates]]
[[Category:Internal link templates]]
}}</includeonly>
Anonymous user

Navigation menu