This site is supported by donations to The OEIS Foundation.

Template:Year

From OeisWiki
Jump to: navigation, search

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

  1. See external links.

External links