Difference between revisions of "Template:Century name from title decade/doc"

From blackwiki
Jump to navigation Jump to search
imported>BrownHairedGirl
(Created page with '{{Documentation subpage}} <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> Extracts a...')
 
imported>BrownHairedGirl
Line 30: Line 30:
 
* [[Template:Title century]]
 
* [[Template:Title century]]
 
* [[Template:Century name from decade or year]]
 
* [[Template:Century name from decade or year]]
* [[Template:Century name from title decade]]
+
* [[Template:Century name from title year]]
  
 
{{string-handling templates}}
 
{{string-handling templates}}

Revision as of 17:03, 16 March 2020

Extracts a 4-digit decade from the current page title, and returns the name of the century in which that year was.

Usage

  • {{Century name from title decade}}

Mostly used in categorisation.

Parameters

All parameters are optional

  1. The single word "dash" changes the output from "nth century" to "nth-century"
  2. A "nomatch" parameter may be used to specify text to be return if the input cannot be processed. Default behaviour is return an empty string if there is no match

Examples

Implementation

This template is implemented by using {{Century name from decade or year}} around {{Title decade}}.

The same effect can be achieved by using {{Century name from decade or year|{{Title decade}}s}} ... but this wrapper makes more easily-read markup

See also