Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a256ace50d44b965

Jump to content

Template:Century/doc

From Wikipedia, the free encyclopedia

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

[edit]
{{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

[edit]
{{Century|2102}} returns 22
{{Century|2101}} returns 22
{{Century|2100}} returns 21
{{Century|2099}} returns 21
{{Century|2098}} returns 21
{{Century|2002}} returns 21
{{Century|2001}} returns 21
{{Century|2000}} returns 20
{{Century|1999}} returns 20
{{Century|1998}} returns 20
{{Century|1902}} returns 20
{{Century|1901}} returns 20
{{Century|1900}} returns 19
{{Century|1899}} returns 19
{{Century|1898}} returns 19
{{Century|102}} returns 2
{{Century|101}} returns 2
{{Century|100}} returns 1
{{Century|99}} returns 1
{{Century|98}} returns 1
{{Century|2}} returns 1
{{Century|1}} returns 1
{{Century|0}} returns -1
{{Century|-1}} returns -1
{{Century|-2}} returns -1
{{Century|-98}} returns -1
{{Century|-99}} returns -1
{{Century|-100}} returns -2
{{Century|-101}} returns -2
{{Century|-1098}} returns -11
{{Century|-1099}} returns -11
{{Century|-1100}} returns -12
{{Century|-1101}} returns -12

See also

[edit]
Template:MILLENNIUM
Template:DECADE
Template:YEARCC
Template:YEARYY
Template:MONTHDAYS
Template:IsLeapYear
Template:JULIANDAY
Template:Weekday
Template:CURRENTCENTURY