ഫലകം:Reign
വാഴ്ച.
Usage
തിരുത്തുകThis template generates an abbreviation for reign (or the Latin rexit): വാഴ്ച.
Typical example:
Emperor [[Augustus]] of [[Roman Empire|Rome]] ({{reign|27 BCE|14 CE}})
produces:
27 BCE – 14 CE)
Default output
തിരുത്തുക- With no parameters and two values, the display is:
- with simple values (en dash is not spaced):
{{reign|1962|present}}
→ വാഴ്ച.
- with simple values (en dash is not spaced):
1962–present
- with one or more complex values (containing whitespace; en dash is spaced):
{{reign|c. 23 BCE|5 CE}}
→ വാഴ്ച.
- with one or more complex values (containing whitespace; en dash is spaced):
c. 23 BCE – 5 CE
- with only a start date:
{{reign|1962}}
→ വാഴ്ച.
- with only a start date:
1962– (This usage is deprecated; use "present" to indicate an ongoing time span, per – leaving it blank looks like an error.) In all such cases, the following is true:
- The "വാഴ്ച.
" is marked up with <abbr>...</abbr>
to provide a mouse-over tooltip that explains that the abbreviation means "reign"
- The space after the "വാഴ്ച.
" 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 "വാഴ്ച. c. 23 BCE – 5 CE".
Additional notes:
- If a blank first date is given, a "?" will be generated for it:
{{reign||732}}
produces "വാഴ്ച.
?–732", and {{reign||c. 732}}
produces "വാഴ്ച.
? – c. 732"
- Legacy use (deprecated): If the template is used with no values, it simply outputs the marked-up "വാഴ്ച.
" Given something like {{reign}} 1962–present
, a line wrap may occur between the "വാഴ്ച.
" 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
തിരുത്തുക|1=
or first unnamed parameter – Start date, e.g. "1935", "c. 1205", "37 BCE", "August 1434", "January 1, 2017".|2=
or second unnamed parameter – End date, e.g. "present", or any of the sorts of dates used in|1=
|3=
or third unnamed parameter – Start date of second range.|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
|3=
and|4=
parameters do not work in the absence of|2=
.
|single=
– A single date (typically a year) for a short reign, where no range is needed. Using{{reign|single=1872}}
avoids the redundant "വാഴ്ച.
1872–1872" and emits "വാഴ്ച.
1872". (This is actually an alias of the |post-date=
parameter.)
|show=
a.k.a.|link=
a.k.a|lk=
– Controls formatting of the "r.":|show=none
– Produces no tooltip or link: "വാഴ്ച.
"; intended for use at second and later occurrences. This can also be done with other negative values such as no, n, off, false, 0.
"; rarely needed, per . This can also be done with positive values such as yes, y, on, true, 1
– Deprecated; shows "r." with|show=abbr
<abbr>
markup, with is already the default output; this parameter does not need to be used.
|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.|pre-date=1645, 1652
|post-date=
– Same as|pre-date=
, but appears after the date range. (|single=
is an alias of this parameter, which is coded to not emit a comma-space if used as the only date.)- Use these two parameters to specify independent years rather than a range, for two short, non-contiguous terms in office:
{{reign|pre-date=1732|post-date=1735}}
→ വാഴ്ച.
- Use these two parameters to specify independent years rather than a range, for two short, non-contiguous terms in office:
1732, 1735
- 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
|wrap=yes
.
- 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
|mid-date=
– A single date to appear between the|1=
|2=
and|3=
|4=
date ranges. As with the former two parameters, it can be "cheated" to show multiple dates in series.|era=
– Gives the "era" at the end. Used (typically with BCE or BC, and without links after first occurrence) when the era must be specified and both/all dates are simple and within the same era. E.g.,{{reign|89|67|era=[[Common Era|BCE]]}}
produces "വാഴ്ച.
BCE 89–67" (while {{reign|89|67 BCE}}
produces the incorrectly spaced "വാഴ്ച.
89 – 67 BCE").
- When either or both dates contain whitespace, this parameter is optional and harmless (and correctly produces the spaced en dash);
{{reign|89|c. 67|era=BCE}}
yields "വാഴ്ച.
- When either or both dates contain whitespace, this parameter is optional and harmless (and correctly produces the spaced en dash);
BCE 89 – c. 67" which is identical to the output of {{reign|89|c. 67 BCE}}
: "വാഴ്ച.
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
{{reign|c. 89|c. 67 BCE}}
or{{reign|c. 89|c. 67|BCE}}
. - "AD", when needed (usually only for perhaps confusingly short dates like "9" and "32") is given after the date on Wikipedia, as in most other academic publications; the AD 32 style is not used here.
- "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
|wrap=yes
– Permits the content to line-wrap at key points (right after a comma, i.e. between two date ranges, between|pre-date=
and|1=
, between the late range date and|post-date=
). Any value supplied to|wrap=
will turn this option on. Does not permit wrapping within a date range, or between the "വാഴ്ച.
" (or replacement wording provided by |show=
options) and the first date, or between the last date and |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.
|show=
a.k.a.|link=
a.k.a.|lk=
– Can be used to replace the "r.":|show=word
– Uses the word "reigned" instead of "r.": വാഴ്ച
|show=colon
– Uses the word "reign", followed by a colon, instead of "r.": വാഴ്ച:
|show=lcolon
– Same as|show=colon
, but with a link to Reign article: വാഴ്ചവാഴ്ച:
|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.
|cap=yes
– Capitalizes the r./reigned/reign text, for use in lists and such. This should never be used in mid-sentence in regular text. Any value supplied to|cap=
will turn this option on. Examples:|cap=y
alone – വാഴ്ച.
|cap=y
|show=none
→ വാഴ്ച.
|cap=y
|show=link
→ വാഴ്ച.
|cap=y
|show=word
→വാഴ്ച
|cap=y
|show=colon
→ വാഴ്ച:
|cap=y
|show=lword
→ വാഴ്ച
|cap=y
|show=lcolon
→ വാഴ്ചവാഴ്ച:
|sortable=
– Only for use in sortable tables {{crossref|(see below for pros and cons of using thing). Uses as a sort key the value of|sort_date=
– or, if that was not specified, the value of one of the following, in descending order of precedence:|single=
,|pre-date=
,|1=
,|2=
,|post-date=
; at least one such date must be specified for this to work.|sort_date=
– Provide a custom date to sort by, e.g. ISO yyyy-mm-dd format, or "-43" for "43 BCE", or "983" for "c. 983". This parameter may also be spelled|sortdate=
or|sort-date=
.
For use in non-royalty contexts
തിരുത്തുക|label=
– Free-form parameter for replacing "വാഴ്ച.
" with some other word or phrase. Overrides any |show=
or |cap=
values. Examples:
|label=in office
→ in office
|label=[[World Snooker Championship|World Champion]]:
→ World Champion:
- Doing
{{reign|1653|1658|label=ruled}}
is effectively synonymous with doing something likeruled {{reign|1653|1658|show=blank}}
, 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
|wrap=yes
, then content may wrap after|label=
, since its content may be arbitrarily long.
- Doing
- The aforementioned
|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
തിരുത്തുകIf the parameter "sortable=yes
" is specified, the template generates invisible text that will cause the output to work in sortable tables, at the cost of adding those words (read-out, audibly) by many screen readers. The benefit is effective, clickable arrows as in "Col 2" below:
Title | Col 1 | Col 2 |
---|---|---|
Foo | 1066 | 1066 |
Bar | വാഴ്ച.
1510|| style="text-align:right;" |വാഴ്ച. 1510– | |
Baz | 1956 | 1956 |
Jaz | വാഴ്ച.
410|| style="text-align:right;" |വാഴ്ച. 410– |
Examples
തിരുത്തുകCode | Output | Works? |
---|---|---|
{{Reign}} 1207–1272 |
വാഴ്ച.
1207–1272 || | |
{{Reign|1207|1272}} |
വാഴ്ച.
1207–1272 || | |
{{Reign |1 October 1207 |1272}} |
വാഴ്ച.
1 October 1207 – 1272 || | |
{{Reign |1 October 1207 |16 November 1272}} |
വാഴ്ച.
1 October 120 – 16 November 1272 || | |
{{Reign |1207 |16 November 1272}} |
വാഴ്ച.
1207 – 16 November 1272 || | |
{{Reign |c. 1207 |1272}} |
വാഴ്ച.
c. 1207 – 1272 || | |
{{Reign |1207 |present}} |
വാഴ്ച.
1207–present || | |
{{Reign |July 27, 2016 |present}} |
വാഴ്ച.
July 27, 2016 – present || | |
{{Reign |1207 |1272}} |
വാഴ്ച.
1207–1272 || | |
{{Reign |1207| 1272}} |
വാഴ്ച.
1207–1272 || | |
{{Reign | 1207 | 1272 }} |
വാഴ്ച.
1207–1272 || | |
{{Reign |c.1207 |1272}} |
വാഴ്ച.
c.1207–1272 || [1] | |
{{Reign |1962|present |show=word}} |
വാഴ്ച
1962–present || | |
{{Reign |1962|present |show=word |cap=y}} |
വാഴ്ച
1962–present || | |
{{Reign |1962|present |show=colon}} |
വാഴ്ച:
1962–present || | |
{{Reign |1962|present |show=colon |cap=y}} |
വാഴ്ച:
1962–present || | |
{{Reign |1962|present |show=lword}} |
വാഴ്ച
1962–present || | |
{{Reign |1962|present |show=lword |cap=y}} |
വാഴ്ച
1962–present || | |
{{Reign |1962|present |show=lcolon}} |
വാഴ്ചവാഴ്ച:
1962–present || | |
{{Reign |1962|present |show=lcolon |cap=y}} |
വാഴ്ചവാഴ്ച:
1962–present || | |
{{Reign |1962|present |show=blank}} |
1962–present || | |
{{Reign |1985}} |
വാഴ്ച.
1985– || | |
{{Reign ||c. 320 BC}} |
വാഴ്ച.
? – c. 320 BC || | |
{{Reign ||940}} |
വാഴ്ച.
?–940 || | |
{{Reign}} |
വാഴ്ച.
|| | |
{{Reign |89|67 BCE}} |
വാഴ്ച.
89 – 67 BCE || [2] | |
{{Reign |89|67 |era=BCE}} |
വാഴ്ച.
BCE 89–67 || | |
{{Reign |c. 89|67 |era=BCE}} |
വാഴ്ച.
BCE c. 89 – 67 || [3] | |
{{Reign |label=ruled|1967|1969}} |
ruled
1967–1969 || | |
{{Reign |label=[[World Snooker Championship|World Champion]]:|1967|1969}} |
World Champion:
1967–1969 || | |
{{Reign |1267 |1272 |post-date=1275}} |
വാഴ്ച.
1267–1272, 1275 || | |
{{Reign |c. 1267 |1272 |post-date=1275}} |
വാഴ്ച.
c. 1267 – 1272, 1275 || | |
{{Reign |pre-date=1265 |1267 |1272 }} |
വാഴ്ച.
1265, 1267–1272 || | |
{{Reign |pre-date=1265 |c. 1267 |1272 |post-date=1275}} |
വാഴ്ച.
1265, c. 1267 – 1272, 1275 || | |
{{Reign |pre-date=c. 54 |43 |post-date=37 |era=BCE}} |
വാഴ്ച.
BCE c. 54, 43– , 37 || | |
{{Reign |pre-date=1265 |post-date=1277}} |
വാഴ്ച.
1265, 1277 || | |
{{Reign |single=43 CE}} |
വാഴ്ച.
43 CE || | |
{{Reign|512|514|520|522}} |
വാഴ്ച.
512–514, 520–522 || | |
{{Reign |1 May 1995|30 April 1996 |1 May 1999|30 April 2000 |wrap=y}} |
വാഴ്ച.
1 May 1995 – 30 April 1996, | |
{{Reign |pre-date=January |1=March|2=May |3=August|4=September |post-date=November |era=2017 |wrap=y}} |
വാഴ്ച.
2017 January, | |
{{Reign|512|514|mid-date=517|520|522}} |
വാഴ്ച.
512–514, 517, 520–522 || | |
{{Reign |1= 512 |2= 514 | mid-date=517 |3= 520 |4= c. 522 }} |
വാഴ്ച.
512–514, 517, 520 – c. 522 || |
- ↑
c.1207
is invalid style (should bec. 1207
), and it consequently is wrongly parsed as a simple date, so the en dash in turn is incorrectly unspaced. - ↑
89|69 BCE
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 with89|69|era=BCE
. - ↑ "വാഴ്ച.
BCE c. 89 – 67" is correct because c. (circa) applies only to a single date. Using
c. 89–67
is invalid, as ambiguous. To show two uncertain dates: "വാഴ്ച. BCE c. 89 – c. 67".
Redirects
തിരുത്തുക{{Reign}}
also can be called with the redirects:
See also
തിരുത്തുകമുകളിൽ കാണുന്ന വിവരണം ഫലകം:Reign/doc എന്ന ഉപതാളിൽ നിന്ന് ഉൾപ്പെടുത്തിയിട്ടുള്ളതാണ്. (തിരുത്തുക | നാൾവഴി) താങ്കൾക്ക് പരീക്ഷണങ്ങൾ ഫലകത്തിന്റെ എഴുത്തുകളരി (നിർമ്മിക്കുക) താളിലോ testcases (നിർമ്മിക്കുക) താളിലോ നടത്താവുന്നതാണ്. ദയവായി വർഗ്ഗങ്ങളും ബഹുഭാഷാകണ്ണികളും /വിവരണം ഉപതാളിൽ മാത്രം ഇടുക. ഈ ഫലകത്തിന്റെ ഉപതാളുകൾ. |