Wikia

Memory Alpha

CENTURY/doc

Discuss0
37,543pages on
this wiki

Template page | < Template:CENTURY

Revision as of 18:36, January 11, 2013 by Renegade54 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template computes the calendar century number for the Gregorian year passed in the first parameter. It is different from the astronomical century number (which starts at 0).

UsageEdit

{{ CENTURY | year }}

The year must be astronomical (year=1 in 1 AD (Anno Domini), year=0 in 1 BC, year=-1 in 2 BC).

ExamplesEdit

{{CENTURY|1900}}
returns 19
{{CENTURY|1901}}
returns 20
{{CENTURY|1999}}
returns 20
{{CENTURY|2000}}
returns 20
{{CENTURY|2001}}
returns 21
{{CENTURY|2099}}
returns 21
{{CENTURY|2100}}
returns 21
{{CENTURY|2101}}
returns 22

Around Wikia's network

Random Wiki