Difference between revisions of "Template:Floruit/sandbox"
(+Doc sections with new info.) |
(Link example.) |
||
| Line 13: | Line 13: | ||
:{{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. | ||
:{{em|id=same|Note:}} In the rare case of {{em|identical}} start and end dates in a formatted range, use of parameter {{bxt|sfx}} ([[#suf|below]]) with an appropriate value {{em|is required}}. | :{{em|id=same|Note:}} In the rare case of {{em|identical}} start and end dates in a formatted range, use of parameter {{bxt|sfx}} ([[#suf|below]]) with an appropriate value {{em|is required}}. | ||
| − | :{{en dash}}{{nbsp}}{{em|for examples see}} [[#brc|here]] {{em|(named and unnamed, include additional option)}} | + | :{{en dash}}{{nbsp}}{{em|for examples see}} [[#brc|here]] {{em|(named and unnamed, include additional option) and}} [[#suf12|here]] {{em|(rare range case, includes additional options)}} |
Optional: | Optional: | ||
*{{bxtn|ca}} (circa){{spnd}} use for [[circa]] dates; the additional prefix "c.", preceded by a narrow no-break space, is inserted before the relevant date(s) ( c.). The dependent parameter {{bxt|ca-tt}} below may be used to add a [[tooltip]] definition over "c.". | *{{bxtn|ca}} (circa){{spnd}} use for [[circa]] dates; the additional prefix "c.", preceded by a narrow no-break space, is inserted before the relevant date(s) ( c.). The dependent parameter {{bxt|ca-tt}} below may be used to add a [[tooltip]] definition over "c.". | ||
Revision as of 17:16, 19 December 2016
[display options] [prepended text] [prefix options] fl.|[active] [date options] [date|range] [date unit(s)] [suffix(es)]
fl. 2010s
(active c. January 2010 – c. February 2010)
(active c. January 2010 [error in template {{floruit}}: date range with identical start and end values] – c. January 2010)
(active c. 2010 BC – c. 2010 AD)
Date formatting parameters
Suggested:
- date or [1] (stand-alone date, or start date in a range)Template:Spnd the time period (or the start 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:DATERANGE). For time periods not delimited with start and end dates (such as "1990s" or "21st century") use this parameter only; in ranges with start and end dates, the additional parameter date2 below may be used, and is recommended. 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 pfx below), the value of date may be preceded by a narrow no-break space, or by a no-break space. A value for this parameter may be required by other options.
- Note: You may treat date as an unnamed parameter, and insert only its desired value.
- Note: 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 in range)Template:Spnd use to format the end date (or end period) in ranges delimited with start and end dates; this parameter is recommended when depicting such ranges. Values may be in any relevant date unit. Requires a start date (parameter date). A spaced en dash is used as the range separator. A value for this parameter may be required by other options.
- Note: You may treat date2 as an unnamed parameter, and insert only its desired value.
- Note: In the rare case of identical start and end dates in a formatted range, use of parameter sfx (below) with an appropriate value is required.
- – for examples see here (named and unnamed, include additional option) and here (rare range case, includes additional options)
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.). The dependent parameter ca-tt below may be used to add a tooltip definition over "c.".
- set
|ca=yesor|ca=dateto apply circa independently of any parameter; or to apply to parameter date where it is used as a stand-alone (or free-form) date, or where it is used as the start date in formatted ranges - set
|ca=date2in formatted ranges only; applies to the end date (parameter date2) - set
|ca=bothin formatted ranges as above, but applies to both start and end date (parameters date and date2)
- set
- – for examples see here (stand-alone date), here (start date in range), here (end date in range), and here (start and end date in range)
- ca-tt (circa tooltip)Template:Spnd use to display the tooltip c. (circa)[lower-alpha 1] when the cursor hovers over "c.", by setting
|ca-tt=yes.[lower-alpha 2] Parameter ca is required; when it is set to|ca=both, the circa tooltip appears over the first instance of "c." only.
- – see last two examples under parameter ca above
Conditional (require a value for parameter date; may require a value for parameter date2):
- 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 this parameter is used with formatted ranges, its value may apply 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, to add the unit after the end date (parameter date2) - 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 (date and date2) - set
|unit=m-min formatted ranges as above, but adds "millennium" instead
- set
- – for examples see here (stand-alone date), here (end date in range), and here (start and end date in range)
- sortableTemplate:Spnd set
|sortable=yesto format the value for parameter date so that it is displayed properly within sortable tables; sorting is applied to stand-alone dates, or to start dates in formatted ranges. This parameter works correctly only with dates that conform to Wikipedia's acceptable date formats. Avoid embedding other templates to date when sortable is used; results may be inconsistent.[lower-alpha 3]
- Note: When sortable is used, 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 (includes additional options)
Suffix formatting parameters
Conditional (require a value for parameter date; may require a value for parameter date2):
- 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 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 this parameter is used with formatted ranges, its value may appear only after the end dateTemplate:Spnd except when the date range straddles eras; this parameter may be required in rare era-straddling cases (see above).
- 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 date2) - 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, to denote they straddle eras; displays BC after the start date (parameter date) and AD after the end date (parameter date2) - 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 (free-form range), here (end date in range), and here (range straddles 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
Examples
- Decade, stand-alone
{{floruit|date=2010s}}- or
{{floruit|2010s}}(note)- Either generates: fl. 2010s
- Decade range, formatted, in parentheses
{{floruit|date=2000|date2=2010|b=yes}}- or
{{floruit|2000|2010|b=yes}}(note)- Either generates: fl. 2000 – c. 2010
- Circa decade, stand-alone
{{floruit|date=2000s|ca=yes}}- Generates: fl.
- Circa start date in formatted decade range
{{floruit|2000|2010|ca=date}}- Generates: fl. 2000 – c. 2010
- Circa end date in formatted century range, with circa tooltip, and date unit
{{floruit|date=20th|date2=21st|ca=date2|ca-tt=yes|unit=c}}- Generates: fl.
- Circa formatted century range, with circa tooltip and date unit
{{floruit|date=20th|date2=21st|ca=both|ca-tt=yes|unit=c}}- Generates: fl.
- Date unit, stand-alone century
{{floruit|date=21st|unit=c}}- Generates: fl.
- Date units, formatted century range
{{floruit|date=20th|date2=21st|unit=c-c}}- Generates: fl.
- Prefix only, in plain text
{{floruit|pfx-lk=no}} 2010s(note)- Generates: fl. 2010s
- "Active" prefix, formatted range
{{floruit|date=January 2000|date2=April 2001|pfx=active}}- Generates: fl.
- Year range, formatted, prefix with tooltip
{{floruit|date=2010|date2=2016|pfx-lk=abbr}}- Generates: fl.
- Suffix, free-form decade range
{{floruit|date=2000s to 2010s|sfx=ce}}- Generates: fl.
- Suffix, formatted mixed-unit range
{{floruit|date=1990s|date2=before 2010|sfx=ce}}- Generates: fl.
- Suffix, formatted century range straddles eras, with date units
{{floruit|date=1st|date2=1st|unit=c-c|sfx=b-a}}(note)- Generates: fl.
- Suffix wikilinked, circa start date in formatted decade range
{{floruit|date=2000s|date2=2010s|ca=yes|sfx=ce|sfx-lk=yes}}- Generates: fl.
- Prepend text, "active" prefix in plain text, formatted range, in parentheses
{{floruit|date=January|date2=October 2000|pre=also known as John Doe,|b=yes|pfx=active|pfx-lk=no}}- Generates: fl.
- Sortable year, word wrap is on, prefix italicized, and suffix
{{floruit|date=050|sortable=yes|pfx-style=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. Error messages may also appear conditionally, depending on the use of particular options; for example, when a formatted range is not defined, adding a circa value for the end date (via parameter ca), will produce a "wrong value" error even if correct (|ca=date2).
Messages precede or replace the relevant parameter value(s), and appear in the following cases:[lower-alpha 4]
Parameters b, ca, pfx-style, pfx-lk, unit, sortable and wrap
- Incorrect value: [error in template
{{floruit}}: parameter option with wrong value]
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 start date] - Identical start and end dates: [error in template
{{floruit}}: date range with identical start and end values]
Parameter pfx
- Incorrect or unsupported prefix: [error in template
{{floruit}}: invalid prefix option]
Parameter pfx-style
- Prefix style not applicable: [error in template
{{floruit}}: prefix style not compatible with prefix option]
Parameter pfx-lk
- Prefix link not allowed with the prefix used: [error in template
{{floruit}}: prefix link inconsistent with prefix option]
Parameter ca-tt
- Circa option required: [error in template
{{floruit}}: circa tooltip option requires circa]
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 5] [error in template
{{floruit}}: wrong date format for the sortable option]
Cite error: <ref> tags exist for a group named "lower-alpha", but no corresponding <references group="lower-alpha"/> tag was found, or a closing </ref> is missing