Difference between revisions of "Template:DECADE/doc"
Jump to navigation
Jump to search
imported>BrownHairedGirl (see also : Template:MILLENNIUM) |
imported>BrownHairedGirl ({{High use|179285}}) |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
| + | {{High use|179285}} | ||
This template computes the decade for the Gregorian year in parameter. | This template computes the decade for the Gregorian year in parameter. | ||
| − | + | === Syntax === | |
: <kbd><nowiki>{{</nowiki>DECADE|</kbd>''year''<kbd>}}</kbd> | : <kbd><nowiki>{{</nowiki>DECADE|</kbd>''year''<kbd>}}</kbd> | ||
* The ''year'' must be astronomical (''year''=1 in [[1 AD]] (''[[Anno Domini]]''), ''year''=0 in 1 BC, ''year''=-1 in 2 BC). | * The ''year'' must be astronomical (''year''=1 in [[1 AD]] (''[[Anno Domini]]''), ''year''=0 in 1 BC, ''year''=-1 in 2 BC). | ||
| − | + | === Examples === | |
| + | : <kbd><nowiki>{{DECADE|9}}</nowiki></kbd> returns {{DECADE|9}} | ||
| + | : <kbd><nowiki>{{DECADE|61}}</nowiki></kbd> returns {{DECADE|61}} | ||
| + | : <kbd><nowiki>{{DECADE|584}}</nowiki></kbd> returns {{DECADE|584}} | ||
: <kbd><nowiki>{{DECADE|1738}}</nowiki></kbd> returns {{DECADE|1738}} | : <kbd><nowiki>{{DECADE|1738}}</nowiki></kbd> returns {{DECADE|1738}} | ||
| + | : <kbd><nowiki>{{DECADE|1899}}</nowiki></kbd> returns {{DECADE|1899}} | ||
: <kbd><nowiki>{{DECADE|1900}}</nowiki></kbd> returns {{DECADE|1900}} | : <kbd><nowiki>{{DECADE|1900}}</nowiki></kbd> returns {{DECADE|1900}} | ||
: <kbd><nowiki>{{DECADE|1901}}</nowiki></kbd> returns {{DECADE|1901}} | : <kbd><nowiki>{{DECADE|1901}}</nowiki></kbd> returns {{DECADE|1901}} | ||
| Line 16: | Line 21: | ||
: <kbd><nowiki>{{DECADE|2000}}</nowiki></kbd> returns {{DECADE|2000}} | : <kbd><nowiki>{{DECADE|2000}}</nowiki></kbd> returns {{DECADE|2000}} | ||
: <kbd><nowiki>{{DECADE|2001}}</nowiki></kbd> returns {{DECADE|2001}} | : <kbd><nowiki>{{DECADE|2001}}</nowiki></kbd> returns {{DECADE|2001}} | ||
| + | : <kbd><nowiki>{{DECADE|2017}}</nowiki></kbd> returns {{DECADE|2017}} | ||
: <kbd><nowiki>{{DECADE|2099}}</nowiki></kbd> returns {{DECADE|2099}} | : <kbd><nowiki>{{DECADE|2099}}</nowiki></kbd> returns {{DECADE|2099}} | ||
: <kbd><nowiki>{{DECADE|2100}}</nowiki></kbd> returns {{DECADE|2100}} | : <kbd><nowiki>{{DECADE|2100}}</nowiki></kbd> returns {{DECADE|2100}} | ||
: <kbd><nowiki>{{DECADE|2101}}</nowiki></kbd> returns {{DECADE|2101}} | : <kbd><nowiki>{{DECADE|2101}}</nowiki></kbd> returns {{DECADE|2101}} | ||
| − | + | === See also === | |
: [[Template:MILLENNIUM]] | : [[Template:MILLENNIUM]] | ||
: [[Template:CENTURY]] | : [[Template:CENTURY]] | ||
| Line 30: | Line 36: | ||
: [[Template:WEEKDAY]] | : [[Template:WEEKDAY]] | ||
| − | <includeonly> | + | <includeonly>{{Sandbox other|| |
[[Category:Date-computing templates|DECADE]] | [[Category:Date-computing templates|DECADE]] | ||
| − | </includeonly> | + | }}</includeonly> |
Latest revision as of 01:14, 14 May 2020
| This is a documentation subpage for Template:DECADE. It contains usage information, categories and other content that is not part of the original template page. |
| This template is used on approximately 228,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. Transclusion count updated automatically (see documentation). |
This template computes the decade for the Gregorian year in parameter.
Syntax
- {{DECADE|year}}
- The year must be astronomical (year=1 in 1 AD (Anno Domini), year=0 in 1 BC, year=-1 in 2 BC).
Examples
- {{DECADE|9}} returns 0s
- {{DECADE|61}} returns 60s
- {{DECADE|584}} returns 580s
- {{DECADE|1738}} returns 1730s
- {{DECADE|1899}} returns 1890s
- {{DECADE|1900}} returns 1900s
- {{DECADE|1901}} returns 1900s
- {{DECADE|1915}} returns 1910s
- {{DECADE|1962}} returns 1960s
- {{DECADE|1999}} returns 1990s
- {{DECADE|2000}} returns 2000s
- {{DECADE|2001}} returns 2000s
- {{DECADE|2017}} returns 2010s
- {{DECADE|2099}} returns 2090s
- {{DECADE|2100}} returns 2100s
- {{DECADE|2101}} returns 2100s
See also
- Template:MILLENNIUM
- Template:CENTURY
- Template:YEARCC
- Template:YEARYY
- Template:MONTHDAYS
- Template:IsLeapYear
- Template:JULIANDAY
- Template:WEEKDAY