Difference between revisions of "Template:Floruit/sandbox"
(Doc draft 2) |
|||
| Line 37: | Line 37: | ||
==Parameters== | ==Parameters== | ||
| − | All parameters are optional. Use of parameters {{bxt|date}} ( | + | All parameters are optional. Use of parameters {{bxt|date}}, and (for date ranges) {{bxt|date2}}, is suggested; either or both may be required by some options. Incorrect values will be flagged under almost all usage scenarios (see {{slink||Error messages}}).<br/> |
| + | Parameter names are in {{bxtn|bold}}; explanatory or expanded text may follow, in parentheses. | ||
===Date formatting parameters=== | ===Date formatting parameters=== | ||
Suggested: | Suggested: | ||
| − | *{{bxtn|date}} or {{bxtn|[1]}} (date, or start | + | *{{bxtn|date}} or {{bxtn|[1]}} (stand-alone date, or start date for range){{spnd}} the time period (or the start date of a time period) during which the subject is known to have been active or popular. Values may be in any relevant time unit. You may also use this parameter as a free-form field, for stand-alone dates or for date ranges; such ranges must be separated by a [[spaced en dash]] where applicable ([[WP:APPROXDATE]]). Time ranges not delimited with start and end dates (such as "1990s" or "21st century") should use this parameter only; ranges with start and end dates may utilize parameter {{bxt|date2}} [[#rng|below]]. Apply any of Wikipedia's [[MOS:DATEFORMAT|acceptable date formats]], but please follow the relevant format established in the article, if any. Preceded by a [[narrow no-break space]]. Depending on the template options used, {{em|this parameter may require a value}}. |
:{{em|id=unnamed|Note:}} You may treat {{bxt|date}} as an unnamed parameter, and insert only its desired value. | :{{em|id=unnamed|Note:}} You may treat {{bxt|date}} as an unnamed parameter, and insert only its desired value. | ||
:{{em|id=space|Note:}} If {{bxt|date}} is not utilized, the displayed output may vary according to the user’s choice of [[whitespace character]](s) following the prefix "fl.", or according to other user formatting. | :{{em|id=space|Note:}} If {{bxt|date}} is not utilized, the displayed output may vary according to the user’s choice of [[whitespace character]](s) following the prefix "fl.", or according to other user formatting. | ||
:{{en dash}}{{nbsp}}{{em|for examples see}} [[#dec|{{em|here}}]] {{em|(unnamed) and}} [[#plain|{{em|here}}]] {{em|(not used)}} | :{{en dash}}{{nbsp}}{{em|for examples see}} [[#dec|{{em|here}}]] {{em|(unnamed) and}} [[#plain|{{em|here}}]] {{em|(not used)}} | ||
| − | *{{anchor|rng}}{{bxtn|date2}} or {{bxtn|[2]}} (end | + | *{{anchor|rng}}{{bxtn|date2}} or {{bxtn|[2]}} (end date for range){{spnd}} this parameter is recommended when depicting floruit time ranges. {{em|Requires}} a value for parameter {{bxt|date}}. A [[spaced en dash]] is used as the range separator. Depending on the template options used, {{em|this parameter may require a value}}. |
:{{em|id=unnamed2|Note:}} You may treat {{bxt|date2}} as an unnamed parameter, and insert only its desired value. | :{{em|id=unnamed2|Note:}} You may treat {{bxt|date2}} as an unnamed parameter, and insert only its desired value. | ||
:{{en dash}}{{nbsp}}{{em|for examples see}} [[#dec|{{em|here}}]] {{em|(unnamed) and}} [[#plain|{{em|here}}]] {{em|(not used)}} | :{{en dash}}{{nbsp}}{{em|for examples see}} [[#dec|{{em|here}}]] {{em|(unnamed) and}} [[#plain|{{em|here}}]] {{em|(not used)}} | ||
Optional: | Optional: | ||
| − | *{{bxtn|ca}} (circa){{spaced en dash}} use for [[circa]] dates; the additional prefix "c.", preceded by a narrow no-break space, is inserted before the relevant date(s) (&# | + | *{{bxtn|ca}} (circa){{spaced en dash}} use for [[circa]] dates; the additional prefix "c.", preceded by a narrow no-break space, is inserted before the relevant date(s) ( c.). Some options {{em|require}} a value for parameter {{bxt|date2}}. |
| − | **set {{para|ca|yes}} or {{para|ca|date}} | + | **set {{para|ca|yes}} or {{para|ca|date}} to apply independently of any parameter; or to apply to parameter {{bxt|date}} (as a stand-alone date or as the start date for a range) |
| − | **set {{para|ca|date2}} | + | **set {{para|ca|date2}} formatted ranges only; applies to the end date (a value for parameter {{bxt|date2}} is {{em|required}}) |
| − | **set {{para|ca|both}} | + | **set {{para|ca|both}} formatted ranges only; applies to both start and end date (values for parameters {{bxt|date}} and {{bxt|date2}} are {{em|required}}) |
:{{en dash}}{{nbsp}}{{em|for examples see}} [[#circa|{{em|here}}]] | :{{en dash}}{{nbsp}}{{em|for examples see}} [[#circa|{{em|here}}]] | ||
Conditional ({{em|requires a value for parameter}} {{bxt|date}}): | Conditional ({{em|requires a value for parameter}} {{bxt|date}}): | ||
| − | *{{bxtn|sortable}}{{spaced en dash}} set {{para|sortable|yes}} to format the {{bxt|date}} | + | *{{bxtn|sortable}}{{spaced en dash}} set {{para|sortable|yes}} to format the value for parameter {{bxt|date}} so that it is displayed properly within [[WP:TABLESORT|sortable table]]s; it works {{em|only}} with stand-alone dates that conform to Wikipedia's [[MOS:DATEFORMAT|acceptable date formats]].{{efn|name=dts}} |
:{{em|id=sorted|Note:}} When using {{bxt|sortable}}, year values less than 1000 require leading zeroes up to the century digit, e.g. "050". Era suffixes (via parameter {{bxt|sfx}} [[#suf|below]]) are ignored. | :{{em|id=sorted|Note:}} When using {{bxt|sortable}}, year values less than 1000 require leading zeroes up to the century digit, e.g. "050". Era suffixes (via parameter {{bxt|sfx}} [[#suf|below]]) are ignored. | ||
:{{en dash}}{{nbsp}}{{em|for an example see}} [[#sort|{{em|here}}]] | :{{en dash}}{{nbsp}}{{em|for an example see}} [[#sort|{{em|here}}]] | ||
| Line 72: | Line 73: | ||
*{{bxtn|b}} (brackets){{spaced en dash}} use {{bxt|b}} to display the template's output in parentheses, by setting {{para|b|yes}}. | *{{bxtn|b}} (brackets){{spaced en dash}} use {{bxt|b}} to display the template's output in parentheses, by setting {{para|b|yes}}. | ||
:{{en dash}}{{nbsp}}{{em|for an example see}} [[#brc|{{em|here}}]] | :{{en dash}}{{nbsp}}{{em|for an example see}} [[#brc|{{em|here}}]] | ||
| − | *{{anchor|tu}}{{bxtn|unit}} (time unit): use this parameter to specify the floruit date | + | *{{anchor|tu}}{{bxtn|unit}} (time unit): use this parameter to specify a time unit for the floruit date or range. When using formatted ranges (via parameter {{bxt|date2}}) the value applies to the end date, or to both start and end dates. |
| − | **set {{para|unit|c}} | + | **set {{para|unit|c}} to add "century" following parameter {{bxt|date}} (as a stand-alone date); or following parameter {{bxt|date2}} as the end date for a range ({{bxt|date2}} value is {{em|required}} in this case) |
| − | **set {{para|unit|m}} | + | **set {{para|unit|m}} as above, but adds "millennium" instead |
| − | **set {{para|unit|c-c}} | + | **set {{para|unit|c-c}} formatted ranges only; adds "century" following both the start and the end date (values for parameters {{bxt|date}} and {{bxt|date2}} are {{em|required}}) |
| − | **set {{para|unit|m-m}} | + | **set {{para|unit|m-m}} formatted ranges as above, but adds "millennium" instead |
| − | *{{anchor|suf}}{{bxtn|sfx}} (suffix): use this parameter to | + | *{{anchor|suf}}{{bxtn|sfx}} (suffix): use this parameter to add an era suffix preceded by a [[no-break space]] to the floruit date or range. Displays in plain text, but you may use the dependent parameter {{bxt|sfx-lk}} (see [[#suflink|below]]) to display with an appropriate wikilink. The available options conform to the [[MOS:ERA|default calendar era]]. If parameter {{bxt|unit}} is specified, the suffix follows the unit value. When using formatted ranges (via parameter {{bxt|date2}}) the value applies to the end date, {{em|except}} when the range straddles eras. |
| − | **set {{para|sfx|ad}} to display the suffix AD ([[Anno Domini]]) | + | **set {{para|sfx|ad}} to display the suffix AD ([[Anno Domini]]) following parameter {{bxt|date}} (as a stand-alone date); or following parameter {{bxt|date2}} as the end date for a range ({{bxt|date2}} value is {{em|required}} in this case) |
| − | **set {{para|sfx|bc}} | + | **set {{para|sfx|bc}} as above, but displays the suffix BC ([[Anno Domini|Before Christ]]) |
| − | **set {{para|sfx|bce}} | + | **set {{para|sfx|bce}} as above, but displays the suffix BCE ([[Common Era|Before Common Era]]) |
| − | **set {{para|sfx|ce}} | + | **set {{para|sfx|ce}} as above, but displays the suffix CE ([[Common Era]]) |
| − | **set {{para|sfx|b-a}} | + | **set {{para|sfx|b-a}} formatted ranges only; displays BC after the start date (parameter {{bxt|date}}) and AD after the end date (parameter {{bxt|date date2}}); values for both parameters are {{em|required}} |
| − | **set {{para|sfx|b-c}} | + | **set {{para|sfx|b-c}} formatted ranges as above, but displays BCE after the start date and CE after the end date |
:{{em|id=rng-note|Note:}} | :{{em|id=rng-note|Note:}} | ||
:{{en dash}}{{nbsp}}{{em|for an example see}} | :{{en dash}}{{nbsp}}{{em|for an example see}} | ||
Revision as of 14:36, 27 September 2016
fl. 2010s
(fl. 2010s)
(fl. c. 21st century BC)
(fl. 200 BCE – 200 CE)
fl. 2000 – 2016
fl. c. 2000 – 2016
(fl. 20th – 21st century)
(fl. 20th – c. 21st century AD)
(fl. c. 2nd century BC – c. 2nd century AD)
(fl. c. 2nd millennium BCE – 2nd millennium CE)
| File:Sandbox.svg | This is the template sandbox page for Template:Floruit (diff). |
| To quickly become familiar with this template, see Script error: No such module "Section link". (as usage summary), and Script error: No such module "Section link".. |
The template floruit (or any of its aliases) may be used to format the display of time periods or eras during which people, ideas, theories, or political, cultural or religious movements etc., may have been active or popular. It utilizes "fl.", an abbreviation of floruit or "flourished" (in Latin), as a prefix to the relevant date(s). The prefix abbreviation is wikilinked to floruit by default, but users may employ different or additional display options. Please also see Script error: No such module "Section link". for possible usage exceptions.
Contents
Usage
Structure
For presentation purposes only, in the box below [brackets] indicate parameter values; variables are italicized; explanatory text is in (parentheses).
|
Copy a blank version to use. All parameter names must be in lowercase. Use the "|" (pipe) character between each parameter. Leading and trailing spaces ( ) are trimmed from parameter values; therefore, parameters will not display if they are only populated by spaces. Misspelled or undefined parameters are ignored. Delete unused parameters or options, and explanatory text. See Script error: No such module "Section link". for important details.
By default, the date or range is prefixed with the abbreviation "fl.", wikilinked to its expanded form (floruit); displayable values are separated by a whitespace characters of varying lengths. Formatted date ranges are separated by a spaced en dash. Line wrap and word wrap is off. Optionally, the floruit date may be set to be sortable.[lower-alpha 1] In most cases, usage errors will result in display of relevant error messages.
Applicability
This template may be used when exact or complete date information Template:Ordered list By definition, the relevant date(s) may be month, year, decade, or century ranges, or may otherwise be inexact or approximate. See WP:APPROXDATE for additional guidance.
Exceptions
Normally, this template should not be used when exact, complete dates need to be indicated, such as a person's birth and death dates, or an organization's founding and dissolution dates. However, it may be used in similar cases if exact or reliable date information is unavailable, or if providing such detail is unnecessary.
Parameters
All parameters are optional. Use of parameters date, and (for date ranges) date2, is suggested; either or both may be required by some options. Incorrect values will be flagged under almost all usage scenarios (see Script error: No such module "Section link".).
Parameter names are in bold; explanatory or expanded text may follow, in parentheses.
Date formatting parameters
Suggested:
- date or [1] (stand-alone date, or start date for range)Template:Spnd the time period (or the start date of a time period) during which the subject is known to have been active or popular. Values may be in any relevant time unit. You may also use this parameter as a free-form field, for stand-alone dates or for date ranges; such ranges must be separated by a spaced en dash where applicable (WP:APPROXDATE). Time ranges not delimited with start and end dates (such as "1990s" or "21st century") should use this parameter only; ranges with start and end dates may utilize parameter date2 below. Apply any of Wikipedia's acceptable date formats, but please follow the relevant format established in the article, if any. Preceded by a narrow no-break space. Depending on the template options used, this parameter may require a value.
- Note: You may treat date as an unnamed parameter, and insert only its desired value.
- Note: If date is not utilized, the displayed output may vary according to the user’s choice of whitespace character(s) following the prefix "fl.", or according to other user formatting.
- – for examples see here (unnamed) and here (not used)
- date2 or [2] (end date for range)Template:Spnd this parameter is recommended when depicting floruit time ranges. Requires a value for parameter date. A spaced en dash is used as the range separator. Depending on the template options used, this parameter may require a value.
- Note: You may treat date2 as an unnamed parameter, and insert only its desired value.
- – for examples see here (unnamed) and here (not used)
Optional:
- ca (circa)Template:Spaced en dash use for circa dates; the additional prefix "c.", preceded by a narrow no-break space, is inserted before the relevant date(s) ( c.). Some options require a value for parameter date2.
- set
|ca=yesor|ca=dateto apply independently of any parameter; or to apply to parameter date (as a stand-alone date or as the start date for a range) - set
|ca=date2formatted ranges only; applies to the end date (a value for parameter date2 is required) - set
|ca=bothformatted ranges only; applies to both start and end date (values for parameters date and date2 are required)
- set
- – for examples see here
Conditional (requires a value for parameter date):
- sortableTemplate:Spaced en dash set
|sortable=yesto format the value for parameter date so that it is displayed properly within sortable tables; it works only with stand-alone dates that conform to Wikipedia's acceptable date formats.[lower-alpha 1]
- Note: When using sortable, year values less than 1000 require leading zeroes up to the century digit, e.g. "050". Era suffixes (via parameter sfx below) are ignored.
- – for an example see here
Prefix formatting parameters
Optional:
- pfx1 (prefix style)Template:Spaced en dash use this parameter to italicize the display of the prefix "fl.", by setting
|pfx1=italics.
- – for an example see here
- pfx2 (prefix link)Template:Spaced en dash alias lk. By default, the prefix is wikilinked to floruit; use this parameter to change the default by inserting one of the following values:
- set
|pfx2=abbrto display a tooltip when the pointer hovers over "fl.", expanding it to "floruit"; tooltip display may depend on browser and/or operating system version. - set
|pfx2=noor|pfx2=offto display "fl." in plain text; use to avoid overlinking when this template is used repeatedly in the body of an article (Script error: No such module "Section link".).
- set
Other parameters
Conditional (require a value for parameter date; may require a value for parameter date2):
- b (brackets)Template:Spaced en dash use b to display the template's output in parentheses, by setting
|b=yes.
- – for an example see here
- unit (time unit): use this parameter to specify a time unit for the floruit date or range. When using formatted ranges (via parameter date2) the value applies to the end date, or to both start and end dates.
- set
|unit=cto add "century" following parameter date (as a stand-alone date); or following parameter date2 as the end date for a range (date2 value is required in this case) - set
|unit=mas above, but adds "millennium" instead - set
|unit=c-cformatted ranges only; adds "century" following both the start and the end date (values for parameters date and date2 are required) - set
|unit=m-mformatted ranges as above, but adds "millennium" instead
- set
- sfx (suffix): use this parameter to add an era suffix preceded by a no-break space to the floruit date or range. Displays in plain text, but you may use the dependent parameter sfx-lk (see below) to display with an appropriate wikilink. The available options conform to the default calendar era. If parameter unit is specified, the suffix follows the unit value. When using formatted ranges (via parameter date2) the value applies to the end date, except when the range straddles eras.
- set
|sfx=adto display the suffix AD (Anno Domini) following parameter date (as a stand-alone date); or following parameter date2 as the end date for a range (date2 value is required in this case) - set
|sfx=bcas above, but displays the suffix BC (Before Christ) - set
|sfx=bceas above, but displays the suffix BCE (Before Common Era) - set
|sfx=ceas above, but displays the suffix CE (Common Era) - set
|sfx=b-aformatted ranges only; displays BC after the start date (parameter date) and AD after the end date (parameter date date2); values for both parameters are required - set
|sfx=b-cformatted ranges as above, but displays BCE after the start date and CE after the end date
- set
- Note:
- – for an example see
- sfx-lk (suffix link): use to wikilink the suffix to the appropriate page, by setting
|sfx-lk=yes;[lower-alpha 2] parameter sfx is required.
- – for an example see here
Optional:
- wrap (word wrap)Template:Spaced en dash by default, template output displays without word wrapping; to turn word wrap on, set
|wrap=yes.
- – for an example see here
Examples
- Decade range
{{floruit|date=2010s}}- or
{{floruit|2010s}}(note)- Either generates: fl. 2010s
- Decade range, in parentheses
{{floruit|date=2010s|b=yes}}- or
{{floruit|2010s|b=yes}}- Either generates: fl. 2010s
- Prefix only, in plain text
{{floruit|pfx2=no}} 2010s(note)- Generates: fl. 2010s
- Years range, prefix with tooltip
{{floruit|date=2010{{snd}}2016}}|pfx2=abbr}}- Generates: fl.
- Circa century and suffix
{{floruit|date=21st century|ca=yes|sfx=ce}}- Generates: fl.
- Suffix wikilinked, prefix in plain text, circa century, in parentheses
{{floruit|date=21st century|b=yes|ca=yes|pfx2=no|sfx=ce|sfx-lk=yes}}- Generates: fl.
- Sortable year, word wrap is on, prefix italicized, and suffix
{{floruit|date=050|sortable=yes|pfx1=italics|sfx=bce|wrap=yes}}(note)- Generates: fl.
Error messages
Multiple errors are flagged per parameter; errors involving the same parameter may be mutually exclusive.
Messages replace the relevant parameter value(s), and appear under the following conditions:[lower-alpha 3]
Parameters b, ca, pfx1, pfx2, sortable and wrap
- Incorrect value: [error in template
{{floruit}}: wrong value for the relevant-parameter option]
Parameters b, sfx and sortable
- Date required: [error in template
{{floruit}}: relevant-parameter option requires a date value]
Parameter sfx
- Incorrect or unsupported entry: [error in template
{{floruit}}: wrong or unsupported suffix]
Parameter sfx-lk
- Suffix not defined: [error in template
{{floruit}}: suffix link requires suffix]
Redirects
{{floruit}} has the following redirects:
- {{fl.}}
- {{flor}}
- {{flor.}}
- {{flourished}}
- {{flr}}
TemplateData
TemplateData for floruit
Formats the display of periods of activity or popularity for people, ideas, or movements
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Date | date 1 | Time-period or era, may be a single date or a range | String | suggested |
| Brackets | b | Set to "yes" to display output in parentheses; requires a 'date' value
| Boolean | optional |
| Circa | ca | Set to "yes" for circa date(s)
| Boolean | optional |
| Prefix style | pfx1 | Set to "italics" to render the prefix fl. in italics | String | optional |
| Prefix link | pfx2 lk | Use to change the default display of the prefix fl.: "abbr" replaces wikilink to 'floruit' with a tooltip; "no" or "off" renders fl. in plain text
| String | optional |
| Suffix | sfx | Adds an era suffix; options are: "ad", "bc", "bce", or "ce"; displays in uppercase; requires a 'date' value | String | optional |
| Suffix link | sfx-lk | Set to "yes" to wikilink the era suffix; requires a suffix
| Boolean | optional |
| Sortable | sortable | Set to "yes" to sort the date correctly within tables; works with single dates only; requires a 'date' value
| Boolean | optional |
| Word wrap | wrap | Set to "yes" to turn word wrap on
| Boolean | optional |
See also
Footnotes
| The above documentation is transcluded from Template:Floruit/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Subpages of this template. |