See something you'd like to change or add, but you've never edited an open encyclopædia before? This overview was written to help absolute beginners get started.
Template:Years ago
From A Storehouse of Knowledge
| Template: Years ago | |
|---|---|
| Use on | Articles, mostly |
| Use for | Insert number of years that have passed since year X |
| Category template applies to page | (none) |
| Template Parameters (See Template style manual). | ||||
|---|---|---|---|---|
| Name | Purpose | Required? | SMW property | Comment |
| 1 | Year in question | yes | ||
Examples
- {{years ago|1980}} = 32 (years since Reagan was elected)
| Year | Event | Years ago |
|---|---|---|
| 1602 | Shakespeare wrote Hamlet | 410 |
| 1945 | US and allies won WWII | 67 |
Code
Subtract the argument from the current year:
{{#expr: {{CURRENTYEAR}} - {{{1}}} }}
