Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Parameters  





2 Usage  





3 Examples  





4 Errors  





5 Redirects  





6 TemplateData  





7 See also  














Template:Century name from decade or year






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

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

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

Bahasa Melayu

Simple English
Slovenščina

اردو
Tiếng Vit

 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


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"

    Category: 
    Date-computing templates
    Hidden categories: 
    Wikipedia template-protected templates
    Templates using TemplateData
     



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

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki