Difference between revisions of "Template:Floruit/sandbox"

From blackwiki
Jump to navigation Jump to search
(→‎Documentation: Rename heading.)
(WIP 3.)
Line 1: Line 1:
<!--Begin {{floruit/sandbox}}--><includeonly>{{#ifeq:{{{pre1|}}}|italics|<em>}}{{#switch:{{{pre2|{{{lk|}}}}}}|no|off=fl.|abbr={{abbr|fl.|floruit}}|#default=[[Floruit|fl.]]}}{{#ifeq:{{{pre1|}}}|italics|</em>}}{{#ifeq:{{{ca|}}}|yes|&#8239;c.}}{{#if:{{{1|{{{era|}}}}}}|&#8239;{{#ifeq:{{{sortable|}}}|yes|{{dts|{{{1|{{{era}}}}}}}}|{{{1|{{{era}}}}}}}}}}</includeonly><!--End {{floruit/sandbox}}--><noinclude>
+
<!--Begin {{floruit/sandbox}}--><includeonly>{{#ifeq:{{{pre1|}}}|italics|<em>}}{{#switch:{{{pre2|{{{lk|}}}}}}|no|off=fl.|abbr={{abbr|fl.|floruit}}|#default=[[Floruit|fl.]]}}{{#ifeq:{{{pre1|}}}|italics|</em>}}{{#ifeq:{{{ca|}}}|yes|&#8239;c.}}{{#if:{{{1|{{{date|}}}}}}|&#8239;{{#ifeq:{{{sortable|}}}|yes|{{dts|{{{1|{{{date}}}}}}}}|{{{1|{{{date}}}}}}}}}}</includeonly><!--End {{floruit/sandbox}}--><noinclude>
 
{{floruit/sandbox|2010s}}
 
{{floruit/sandbox|2010s}}
  
 
==Scope and structure==
 
==Scope and structure==
The template [[Template:floruit/sandbox|floruit/sandbox]] (or [[#Redirects|its aliases]]) formats the display of time periods or eras during which people, ideas, or movements 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.
+
The template {{bxtn|floruit}} (or [[#Redirects|its aliases]]) formats the display of time periods or eras during which people, ideas, or movements 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.
  
 
==Usage==
 
==Usage==
 
{{csdoc|usage full}}
 
{{csdoc|usage full}}
:<code><nowiki>{{floruit/sandbox|era= </nowiki>{{bxt|or}} {{var|[date-value(s)]}}<nowiki>|ca= |sortable= |pre1= |pre2= }}</nowiki></code>
+
:<code><nowiki>{{floruit/sandbox|date= </nowiki>{{bxt|or}} {{var|[date-value]}}<nowiki>|ca= |sortable= |pre1= |pre2= }}</nowiki></code>
 
{{end}}
 
{{end}}
  
 
Use the template to signify time periods or eras during which people, concepts, scientific theories, or political, cultural, artistic or religious movements etc. were active or popular. [[Floruit|By definition]], the date(s) of such periods may be inexact or approximate.
 
Use the template to signify time periods or eras during which people, concepts, scientific theories, or political, cultural, artistic or religious movements etc. were active or popular. [[Floruit|By definition]], the date(s) of such periods may be inexact or approximate.
  
Normally, this template should not be used when {{em|exact dates}} should be indicated. For example, this template should not be used for a person's birth and/or death dates, or for an organization's founding and/or dissolution dates; however, it may be used in similar cases when there is no reliable or exact dating information.
+
Normally, this template should not be used when {{em|exact dates}} should be indicated. For example, this template should not be used for a person's birth and/or death dates, or for an organization's founding and/or dissolution dates; however, it may be used in similar cases, when there is no reliable or exact dating information.
  
 
==Examples==
 
==Examples==
 
Some of the following examples may utilize additional, embedded templates, in order to enhance presentation or clarity. Such practice is optional.
 
Some of the following examples may utilize additional, embedded templates, in order to enhance presentation or clarity. Such practice is optional.
*{{strong|Prefix only, wikilinked}}
+
*{{strong|Decade, prefix wikilinked}}
:<code><nowiki>{{floruit/sandbox}} 2016</nowiki></code>
+
:<code><nowiki>{{floruit/sandbox|2010s}}</nowiki></code>
:Generates: {{floruit/sandbox}} 2016
+
:Generates: {{floruit/sandbox|2010s}}
*{{strong|Single year, prefix in plain text}}
+
*{{strong|Prefix only, in plain text}}
:<code><nowiki>{{floruit/sandbox|era=2016|pre2=off}}</nowiki></code>
+
:<code><nowiki>{{floruit/sandbox|pre2=no}} 2010s</nowiki></code>
:Generates: {{floruit/sandbox|era=2016|pre2=off}}
+
:Generates: {{floruit/sandbox|pre2=no}} 2010s
*{{strong|Circa decade, prefix in plain text}}
 
:<code><nowiki>{{floruit/sandbox|era=2010s|ca=yes|pre2=off}}</nowiki></code>
 
:Generates: {{floruit/sandbox|era=2010s|ca=yes|pre2=off}}
 
 
*{{strong|Year range, prefix with tooltip}}
 
*{{strong|Year range, prefix with tooltip}}
:<code><nowiki>{{floruit/sandbox|era={{dash year|2010|2016}}|pre2=abbr}}</nowiki></code>
+
:<code><nowiki>{{floruit/sandbox|date={{dash year|2010|2016}}|pre2=abbr}}</nowiki></code>
:Generates: {{floruit/sandbox|era={{dash year|2010|2016}}|pre2=abbr}}
+
:Generates: {{floruit/sandbox|date={{dash year|2010|2016}}|pre2=abbr}}
:{{en dash}}{{nbsp}}{{em|Uses}} {{tl|dash year}} {{em|to format year range}}
+
:{{en dash}}{{nbsp}}{{em|Uses}} {{tl|dash year}} {{em|to format year range, but please see [[#sort|here]]}}
 
*{{strong|Circa century, prefix wikilinked}}
 
*{{strong|Circa century, prefix wikilinked}}
:<code><nowiki>{{floruit/sandbox|era=21st century CE|ca=yes}}</nowiki></code>
+
:<code><nowiki>{{floruit/sandbox|date=21st century CE|ca=yes}}</nowiki></code>
:Generates: {{floruit/sandbox|era=21st century CE|ca=yes}}
+
:Generates: {{floruit/sandbox|date=21st century CE|ca=yes}}
*{{strong|Decade range, prefix italicized & wikilinked}}
 
:<code><nowiki>{{floruit/sandbox|era={{daterange|1990s|2010s}}|pre1=italics}}</nowiki></code>
 
:Generates: {{floruit/sandbox|era={{daterange|1990s|2010s}}|pre1=italics}}
 
:{{en dash}}{{nbsp}}{{em|Uses}} {{tl|daterange}} {{em|to format decade range}}
 
 
*{{strong|Single year sortable, prefix italicized with tooltip}}  
 
*{{strong|Single year sortable, prefix italicized with tooltip}}  
:<code><nowiki>{{floruit/sandbox|era=2016|sortable=yes|pre1=italics|pre2=abbr}}</nowiki></code>
+
:<code><nowiki>{{floruit/sandbox|date=2016|sortable=yes|pre1=italics|pre2=abbr}}</nowiki></code>
:Generates: {{floruit/sandbox|era=2016|sortable=yes|pre1=italics|pre2=abbr}}
+
:Generates: {{floruit/sandbox|date=2016|sortable=yes|pre1=italics|pre2=abbr}}
*{{strong|Single year (extracted), prefix italicized & wikilinked}}
 
:<code><nowiki>{{floruit/sandbox|era={{YEAR|1 January 2016}}|pre1=italics}}</nowiki></code>
 
:Generates: {{floruit/sandbox|era={{YEAR|1 January 2016}}|pre1=italics}}
 
:{{en dash}}{{nbsp}}{{em|Uses}} {{tl|YEAR}} {{em|to extract year from date}}
 
  
 
==Parameters==
 
==Parameters==
Line 48: Line 37:
  
 
===Date formatting parameters===
 
===Date formatting parameters===
*{{bxtn|era}}{{spaced en dash}}the time period during which the subject is known to have been active or popular. Dated in year(s), decade(s), centuries or other time units, including ranges. Do not wikilink. Not checked for date-formatting errors. May be any one of Wikipedia's [[MOS:DATEFORMAT|acceptable date formats]], but please follow the relevant format established in the article, if any. The display of this parameter's value is preceded by a [[narrow no-break space]] (&#8239;).
+
*{{bxtn|date}}{{spaced en dash}}the time period during which the subject is known to have been active or popular. Dated in year(s), decade(s), centuries or other time units, including ranges. Do not wikilink. Not checked for date-formatting errors. May be any one of Wikipedia's [[MOS:DATEFORMAT|acceptable date formats]], but please follow the relevant format established in the article, if any. The display of this parameter's value is preceded by a [[narrow no-break space]] (&#8239;).
 
:{{em|Optionally}}, you may insert only the parameter's desired value instead; in such cases, this should be the {{em|first entry}} in the template.
 
:{{em|Optionally}}, you may insert only the parameter's desired value instead; in such cases, this should be the {{em|first entry}} in the template.
 
*{{bxtn|ca}}{{spaced en dash}}set {{para|ca|yes}} for [[circa]] dates; adds a [[narrow no-break space]] (&#8239;) and the additional prefix "c." before the date value.
 
*{{bxtn|ca}}{{spaced en dash}}set {{para|ca|yes}} for [[circa]] dates; adds a [[narrow no-break space]] (&#8239;) and the additional prefix "c." before the date value.
 
*{{bxtn|sortable}}{{spaced en dash}}set {{para|sortable|yes}} to format the date value(s) so that they are displayed properly within [[WP:TABLESORT|sortable table]]s.
 
*{{bxtn|sortable}}{{spaced en dash}}set {{para|sortable|yes}} to format the date value(s) so that they are displayed properly within [[WP:TABLESORT|sortable table]]s.
:{{em|Note:}} in order to do proper sorting, this parameter wraps template {{tl|dts}} around the date value(s); it works best with single date values.
+
:{{em|id=sort|Note:}} To sort correctly, {{para|sortable}} wraps template {{tl|dts}} around the date value(s); it works best with single date values. When using this parameter, {{em|do not}} insert other templates as values to {{para|date}}; results may be unpredictable.
  
 
===Prefix formatting parameters===
 
===Prefix formatting parameters===
Line 71: Line 60:
 
*{{tl|Circa}}
 
*{{tl|Circa}}
 
*{{tl|Reign}}
 
*{{tl|Reign}}
 +
 +
==Template data==
 +
This is the [[Wikipedia:TemplateData|TemplateData]] documentation for this template used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools.
 +
 +
{{bxtn|floruit}}
 +
<templatedata>
 +
{
 +
"params": {
 +
"pre1": {
 +
"label": "Prefix italics",
 +
"description": "Set to \"italics\" to render the prefix \"fl.\" in italics",
 +
"type": "string"
 +
},
 +
"pre2": {
 +
"aliases": [
 +
"lk"
 +
],
 +
"label": "Prefix links",
 +
"description": "Use to change the default prefix display: \"abbr\" replaces the wikilink with a tooltip; \"no\" or \"off\" renders prefix in plain text",
 +
"type": "string"
 +
},
 +
"ca": {
 +
"label": "Circa",
 +
"description": "Set to \"yes\" for circa date(s)",
 +
"type": "string"
 +
},
 +
"date": {
 +
"aliases": [
 +
"1 [unnamed]"
 +
],
 +
"label": "Date(s)",
 +
"description": "Time-period or era, may be a single date or a range",
 +
"type": "string",
 +
"suggested": true
 +
},
 +
"sortable": {
 +
"label": "Sortable",
 +
"description": "Set to \"yes\" to sort the date correctly within tables",
 +
"type": "string"
 +
}
 +
},
 +
"description": "Formats the display of periods of activity or popularity for people, ideas, or movements",
 +
"paramOrder": [
 +
"date",
 +
"ca",
 +
"sortable",
 +
"pre1",
 +
"pre2"
 +
],
 +
"format": "inline"
 +
}
 +
</templatedata>
 
</noinclude><includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
 
</noinclude><includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
 
<!-- Categories go here and interwikis go in Wikidata. -->
 
<!-- Categories go here and interwikis go in Wikidata. -->

Revision as of 18:08, 22 February 2016

fl. 2010s

Scope and structure

The template floruit (or its aliases) formats the display of time periods or eras during which people, ideas, or movements 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.

Usage

Full parameter set in horizontal format
{{floruit/sandbox|date= or [date-value]|ca= |sortable= |pre1= |pre2= }}

Use the template to signify time periods or eras during which people, concepts, scientific theories, or political, cultural, artistic or religious movements etc. were active or popular. By definition, the date(s) of such periods may be inexact or approximate.

Normally, this template should not be used when exact dates should be indicated. For example, this template should not be used for a person's birth and/or death dates, or for an organization's founding and/or dissolution dates; however, it may be used in similar cases, when there is no reliable or exact dating information.

Examples

Some of the following examples may utilize additional, embedded templates, in order to enhance presentation or clarity. Such practice is optional.

  • Decade, prefix wikilinked
{{floruit/sandbox|2010s}}
Generates: fl. 2010s
  • Prefix only, in plain text
{{floruit/sandbox|pre2=no}} 2010s
Generates: fl. 2010s
  • Year range, prefix with tooltip
{{floruit/sandbox|date={{dash year|2010|2016}}|pre2=abbr}}
Generates: fl. 2010–16
 Uses {{dash year}} to format year range, but please see here
  • Circa century, prefix wikilinked
{{floruit/sandbox|date=21st century CE|ca=yes}}
Generates: fl. c. 21st century CE
  • Single year sortable, prefix italicized with tooltip
{{floruit/sandbox|date=2016|sortable=yes|pre1=italics|pre2=abbr}}
Generates: fl.2016

Parameters

All parameters are optional.

Date formatting parameters

  • dateTemplate:Spaced en dashthe time period during which the subject is known to have been active or popular. Dated in year(s), decade(s), centuries or other time units, including ranges. Do not wikilink. Not checked for date-formatting errors. May be any one of Wikipedia's acceptable date formats, but please follow the relevant format established in the article, if any. The display of this parameter's value is preceded by a narrow no-break space ( ).
Optionally, you may insert only the parameter's desired value instead; in such cases, this should be the first entry in the template.
Note: To sort correctly, |sortable= wraps template {{dts}} around the date value(s); it works best with single date values. When using this parameter, do not insert other templates as values to |date=; results may be unpredictable.

Prefix formatting parameters

  • pre1Template:Spaced en dashuse this parameter to italicize the display of the prefix "fl.", by setting |pre1=italics.
  • pre2Template:Spaced en dashalias lk. By default, the prefix is wikilinked to floruit; use this parameter to change this default by inserting one of the following values:
    • Set |pre2=abbr to instead display a tooltip when the cursor hovers over "fl.", expanding it to "floruit".
    • Set |pre2=no or |pre2=off to display "fl." as plain text; use to avoid overlinking when this template is used repeatedly in the body of an article.

Redirects

{{floruit}} can be replaced with the redirects:

See also

Template data

This is the TemplateData documentation for this template used by VisualEditor and other tools.

floruit

Formats the display of periods of activity or popularity for people, ideas, or movements

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Date(s)date 1 [unnamed]

Time-period or era, may be a single date or a range

Stringsuggested
Circaca

Set to "yes" for circa date(s)

Stringoptional
Sortablesortable

Set to "yes" to sort the date correctly within tables

Stringoptional
Prefix italicspre1

Set to "italics" to render the prefix "fl." in italics

Stringoptional
Prefix linkspre2 lk

Use to change the default prefix display: "abbr" replaces the wikilink with a tooltip; "no" or "off" renders prefix in plain text

Stringoptional