Home  

Random  

Nearby  



Log in  



Settings  



Donate  



About Wikipedia  

Disclaimers  



Wikipedia





Template:Century name from decade or year





Template  

Talk  



Language  

Watch  

View source  





When supplied with a 1-, 2-, 3- or 4-digit year or decade, returns the name of the century.

Mostly used in categorisation.

Parameters

  1. The first parameter is required: either a 1-, 2-, 3-, or 4-digit year (e.g. 61, 905, 1839) or a 2-, 3-, or 4--digit decade (e.g. 60s, 900s, 1830s)
  2. The second parameter is optional. The single word "dash" changes the output from "nth century" to "nth-century"
  3. An optional "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

Usage

Examples

Errors

Empty or inappropriate parameters produce no output, unless the "nomatch" paremeter is set.

With "nomatch"

Redirects

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Century name from decade or year in articles based on its TemplateData.

TemplateData for Century name from decade or year

Returns the name of the century for a 1-, 2-, 3- or 4-digit year or decade.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Year or decade1

a 1-, 2-, 3- or 4-digit-year (e.g. '1957') or a 4-digit-decade (e.g. '1760s')

Default
Numberoptional
dash2

If this parameter is dash, then the century number is followed by a dash rather than a space, i.e. '16th-century' instead of the default '16th century'

Default
Stringoptional
No match textnomatch

If the input is not a 1-, 2-, 3- or 4-digit year or decade, output the "nomatch" value. Defaults to blank.

Stringoptional

See also

  • Template:Title year+1
  • Template:Title year-1
  • Template:Title year range
  • Template:Title year2range
  • Template:Title year2range+1
  • Template:Title year2range-1
  • Template:Title monthname
  • Template:Title decade
  • Template:Title century
  • Template:Title number
  • Template:Make YYYY–YY
  • Template:Century name from title year
  • Template:Century name from title decade
  • Template:Century name from decade or year

  • Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Century_name_from_decade_or_year&oldid=955587479"
     



    Last edited on 8 May 2020, at 16:53  


    Languages

     


    Аԥсшәа
    العربية

    Беларуская (тарашкевіца)
    فارسی

    Bahasa Indonesia
    Македонски

    Bahasa Melayu

    Simple English
    Slovenščina

    اردو
    Tiếng Vit

     

    Wikipedia


    This page was last edited on 8 May 2020, at 16:53 (UTC).

    Content is available under CC BY-SA 4.0 unless otherwise noted.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Terms of Use

    Desktop