Template:Floruit/sandbox
| 50px | This is the template sandbox page for Template:Floruit (diff). |
| File:OOjs UI icon information-progressive.svg | 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".. |
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); a special option may instead employ "active" as prefix. The prefix is wikilinked to floruit by default, but different or additional display options may be used. 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); optionally, the prefix may be replaced by "active" in special cases. Displayable template 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. When the template is applied to persons with known occupations, the prefix option "active" is recommended; 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. Usage 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 below, for presentation only.
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 date 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 periods not delimited with start and end dates (such as "1990s" or "21st century") should use this parameter only; in ranges with start and end dates you may additionally utilize parameter date2 below. Apply any of Wikipedia's acceptable date formats, but please follow the relevant format established in the article, if any. Depending on the prefix used (parameter pfx2 below), this parameter's value may be preceded by a narrow no-break space, or by a 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: The template display does not include trailing whitespace character(s); when date is not utilized, displayed output may vary according to user formatting.
- – for examples see here (named and unnamed) and here (not used)
- date2 or [2] (end date for range)Template:Spnd used to format date ranges delimited with start and end dates; this parameter is recommended when depicting such ranges. Requires a start date for the range, via 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 (named and unnamed)
Optional:
- ca (circa)Template:Spnd use for circa dates; the additional prefix "c.", preceded by a narrow no-break space, is inserted before the relevant date(s) ( c.). When using formatted ranges (see parameter date2) a value for the end date is required; a value for the start date may also be required.
- set
|ca=yesor|ca=dateto apply circa independently of any parameter; or to apply to just parameter date when used as a stand-alone (or free-form) date, or, as the start date for a formatted range - set
|ca=date2in formatted ranges only; applies to the end date (a value for parameter date2 is required) - set
|ca=bothin formatted ranges as above, but applies to both start and end date (values for parameters date and date2 are required)
- set
- – for examples see here (stand-alone date and range start date), here (range end date), and here (start and end date)
Conditional (requires a value for parameter date):
- sortableTemplate:Spnd set
|sortable=yesto format the value for parameter date so that it is displayed properly within sortable tables; it works only with 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:Spnd use this parameter to italicize the display of the prefix, by setting
|pfx1=italics.
- – for an example see here
- pfx2 (prefix link)Template:Spnd alias lk. The abbreviation "fl." wikilinked to floruit and followed by a narrow no-break space is used as the default prefix; 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
|pfx2=activeto replace "fl." with "active" followed by a no-break space, wikilinked to floruit; recommended when referring to persons with known occupations - set
|pfx2=active-noor|pfx2=active-offto use "active" as above, but in plain text
- set
Other parameters
Conditional (require a value for parameter date; may require a value for parameter date2):
- b (brackets)Template:Spnd use b to display the template's output in parentheses, by setting
|b=yes.
- – for an example see here
- unit (date unit)Template:Spnd use this parameter to specify a date unit for the floruit date or range, preceded by a no-break space. When using formatted ranges (see parameter date2), the value applies to the end date, or to both start and end date.
- set
|unit=cto add "century" after parameter date when it is a stand-alone (or free-form) date; or, in formatted ranges, after the end date (a value for date2 is required) - set
|unit=mas above, but adds "millennium" instead - set
|unit=c-cin formatted ranges only; adds "century" after both the start and the end date (values for parameters date and date2 are required) - set
|unit=m-min formatted ranges as above, but adds "millennium" instead
- set
- sfx (suffix)Template:Spnd 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 (see parameter date2) the value applies to the end date, except when the date range straddles eras.
- set
|sfx=adto display the suffix AD (Anno Domini) after parameter date when used as a stand-alone (or free-form) date; or, in formatted ranges, after the end date parameter (a value for date2 is required) - 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-ain formatted ranges only, when they straddle eras; displays BC after the start date (parameter date) and AD after the end date (parameter date2); values for both parameters are required - set
|sfx=b-cin formatted ranges as above, but displays BCE after the start date and CE after the end date
- set
- – for examples see here (stand-alone date), here (range end date), and here (start and end date straddle eras)
- sfx-lk (suffix link)Template:Spnd 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:Spnd by default, template output displays without word wrapping; to turn word wrap on, set
|wrap=yes.
- – for an example see here
Examples
- Decade range, free-form
- Decade range, formatted, in parentheses
{{floruit/sandbox|date=2000|date2=2010|b=yes}}- or
{{floruit/sandbox|2000|2010|b=yes}}(note)- Either generates: (fl. 2000 – 2010)
- Circa, free-form decade range or, circa decade range start date
{{floruit/sandbox|date=2000s|ca=yes}}- Generates: fl. c. 2000s
- or
{{floruit/sandbox|2000|2010|ca=date}}- Generates: fl. c. 2000 – 2010
- Circa century range end date, with date unit
{{floruit/sandbox|date=20th|date2=21st|ca=date2|unit=c}}- Generates: fl. 20th – c. 21st century
- Circa century range, with date unit
{{floruit/sandbox|date=20th|date2=21st|ca=both|unit=c}}- Generates: fl. c. 20th – c. 21st century
- Prefix only, in plain text
{{floruit/sandbox|pfx2=no}} 2010s(note)- Generates: fl. 2010s
- Years range, formatted, prefix with tooltip
{{floruit/sandbox|date=2010|date2=2016|pfx2=abbr}}- Generates: fl. 2010 – 2016
- "Active" prefix, formatted range
{{floruit/sandbox|date=January 2000|date2=April 2001|pfx2=active}}- Generates: active January 2000 – April 2001
- Date unit
{{floruit/sandbox|date=21st|ca=yes|unit=c|sfx=ce}}- Generates: fl. c. 21st century CE
- Millennium range, formatted, with circa start date, date unit, suffix wikilinked, prefix in plain text, in parentheses
{{floruit/sandbox|date=1st|date2=2nd|b=yes|pfx2=no|ca=yes|unit=m|sfx=ce|sfx-lk=yes}}- Generates: (fl. c. 1st – 2nd millennium CE)
- Sortable year, word wrap is on, prefix italicized, and suffix
{{floruit/sandbox|date=050|sortable=yes|pfx1=italics|sfx=bce|wrap=yes}}(note)- Generates: fl. 50 BCE
- "Active" prefix in plain text, formatted circa range, straddles eras, suffixes wikilinked
{{floruit/sandbox|date=20|date2=20|pfx2=active-no|ca=both|sfx=b-a|sfx-lk=yes}}- Generates: active c. 20 BC – c. 20 AD
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, unit, sortable and wrap
- Incorrect value: [error in template
{{floruit}}: wrong value for the parameter option]
Parameters b, unit, sfx and sortable
- Date required: [error in template
{{floruit}}: parameter option requires a date value]
Parameter date2
- Start date missing: [error in template
{{floruit}}: date range requires a starting date]
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]
Parameter sortable
- Incorrect date format:[lower-alpha 4] [error in template
{{floruit}}: wrong date format for the sortable option]
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
- ↑ 1.0 1.1 1.2 Template {{dts}} (date time sorting) has been embedded in code and becomes active when the sortable option is used.
- ↑ Any other value is ignored silently.
- ↑ When error messages appear in live usage, the included template link to {{floruit}} is active.
- ↑ Trap for related {{dts}} native errors.[lower-alpha 1]
| 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. |