Difference between revisions of "Template:Years ago"

From Conservapedia
Jump to navigation Jump to search
(Made the code visible, without that false "curly bracket" error message)
m
Line 1: Line 1:
 
<includeonly>{{#expr: {{CURRENTYEAR}} - {{{1}}} }}</includeonly><noinclude>
 
<includeonly>{{#expr: {{CURRENTYEAR}} - {{{1}}} }}</includeonly><noinclude>
  
−
Code:
+
==Code==
 +
 
 +
Subtract the argument from the current year:
  
 
<nowiki>{{#expr: {{CURRENTYEAR}} - {{{1}}} }}</nowiki>
 
<nowiki>{{#expr: {{CURRENTYEAR}} - {{{1}}} }}</nowiki>
  
−
Examples:
+
==Examples==
 +
 
 
* <nowiki>{{years ago|1980}}</nowiki> = {{years ago|1980}} (years since Reagan was elected)
 
* <nowiki>{{years ago|1980}}</nowiki> = {{years ago|1980}} (years since Reagan was elected)
  

Revision as of 11:33, June 2, 2007


Code

Subtract the argument from the current year:

{{#expr: {{CURRENTYEAR}} - {{{1}}} }}

Examples

  • {{years ago|1980}} = 46 (years since Reagan was elected)


Various historical events
Year Event Years ago
1602 Shakespeare wrote Hamlet 425
1945 US and allies won WWII 81