This site is supported by donations to The OEIS Foundation.
Template:Year
[⧼Purge⧽ Template:Year]
The {{year}} template provides a standardized notation for years, using either of the two following systems:[1]
- Common Era (Current Era) system: (current configuration)
- ce (Common Era or Current Era) (small caps suffix after space);
- bce (before the Common Era or before the Current Era) (small caps suffix after space),
- Dionysian system:
- bc (“before Christ”) (small caps suffix after space);
- ad (anno Domini, “[the] year of [the] Lord”) (small caps prefix followed by space).
Usage
{{year|year}}
where
- year: nonzero real number (since there is no year 0, gives integer away from 0) with optional era abbreviation (unpunctuated, case insensitive).
Examples
The code {{year|-0.4}}
yields 1 bce.
The code {{year|-325}}
yields 325 bce.
The code {{year|-325.4}}
yields 326 bce.
The code {{year|325BCE}}
yields 325 bce.
The code {{year|325 BCE}}
yields 325 bce.
The code {{year|325bce}}
yields 325 bce.
The code {{year|325BC}}
yields 325 bce.
The code {{year|325bc}}
yields 325 bce.
The code {{year|-325BCE}}
yields 325 ce. (OK: ( − 1) × ( − 1) = +1)
The code {{year|-325.4BCE}}
yields 326 ce. (OK: ( − 1) × ( − 1) = +1)
The code {{year|0.4}}
yields 1 ce.
The code {{year|1608}}
yields 1608 ce.
The code {{year|1608.4}}
yields 1609 ce.
The code {{year|+1608}}
yields 1608 ce.
The code {{year|1608CE}}
yields 1608 ce.
The code {{year|1608 CE}}
yields 1608 ce.
The code {{year|1608ce}}
yields 1608 ce.
The code {{year|1608AD}}
yields 1608 ce.
The code {{year|AD 1608}}
yields 1608 ce.
The code {{year|1608ad}}
yields 1608 ce.
The code {{year|ad 1608}}
yields 1608 ce.
The code {{year|-1608CE}}
yields 1608 bce. (OK: ( − 1) × ( + 1) = − 1)
The code {{year|-1608.4CE}}
yields 1609 bce. (OK: ( − 1) × ( + 1) = − 1)
The code {{year|2000 - 32}}
yields 1968 ce.
The code {{year|32 - 2000}}
yields 1968 bce.
Examples with invalid arguments
The code {{year|0}}
yields Year error: First argument (year) must be a nonzero real number.
The code {{year|25 - 5^2}}
yields Year error: First argument (year) must be a nonzero real number.
The code {{year|nineteen hundred eighty-four}}
yields Year error: First argument (year) must be a nonzero real number.
Notes
- ↑ See external links.
External links
- Calendar era—Wikipedia.org.
- Common Era—Wikipedia.org.
- Tanya Trusler, Abbreviations for Years: How to Use BC, AD, BCE & CE Correctly, November 5, 2015.
- 9.34: Eras—The Chicago Manual of Style Online © 2006, 2007, 2010, 2017 by The University of Chicago.
- 10.38: Abbreviations for chronological eras—The Chicago Manual of Style Online © 2006, 2007, 2010, 2017 by The University of Chicago.