.

Template:CENTURY/doc

Wikicars, a place to share your automotive knowledge
Jump to: navigation, search
Edit-copy green.png This is a documentation subpage for CENTURY/doc (see that page for the template or article itself).
It contains usage information, categories, interlanguage links and other content that is not part of the original page.


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

Syntax:
{{CENTURY|year}}
  • The year must be astronomical (year=1 in 1 AD (Anno Domini), year=0 in 1 BC, year=-1 in 2 BC).
Examples:
{{CENTURY|1900}} returns {{#if:1900|{{#expr:((1900-1)/100-0.5 round 0)+1}}|Parameter 1=year required!}}
{{CENTURY|1901}} returns {{#if:1901|{{#expr:((1901-1)/100-0.5 round 0)+1}}|Parameter 1=year required!}}
{{CENTURY|1999}} returns {{#if:1999|{{#expr:((1999-1)/100-0.5 round 0)+1}}|Parameter 1=year required!}}
{{CENTURY|2000}} returns {{#if:2000|{{#expr:((2000-1)/100-0.5 round 0)+1}}|Parameter 1=year required!}}
{{CENTURY|2001}} returns {{#if:2001|{{#expr:((2001-1)/100-0.5 round 0)+1}}|Parameter 1=year required!}}
{{CENTURY|2099}} returns {{#if:2099|{{#expr:((2099-1)/100-0.5 round 0)+1}}|Parameter 1=year required!}}
{{CENTURY|2100}} returns {{#if:2100|{{#expr:((2100-1)/100-0.5 round 0)+1}}|Parameter 1=year required!}}
{{CENTURY|2101}} returns {{#if:2101|{{#expr:((2101-1)/100-0.5 round 0)+1}}|Parameter 1=year required!}}
See also:
Template:DECADE
Template:YEARCC
Template:YEARYY
Template:MONTHDAYS
Template:ISLEAPYEAR
Template:JULIANDAY
Template:WEEKDAY
Template:ISOYEAR
Template:CURRENTCENTURY