Template:yearssince

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(*before* 1970)
(was right before; well, almost; clarifying)
Line 1: Line 1:
-
<includeonly>{{#ifexpr:{{CURRENTMONTH}}>{{{m|{{#time:n|{{{1|}}}}}}}} or ( {{CURRENTMONTH}}={{{m|{{#time:n|{{{1|}}}}}}}} and {{CURRENTDAY}}>={{{d|{{#time:j|{{{1|}}}}}}}} )|{{#expr: {{CURRENTYEAR}} - {{{y|{{#time:Y|{{{1|}}}}}}}} }}|{{#expr: ( {{CURRENTYEAR}} - 1 ) - {{{y|{{#time:Y|{{{1|}}}}}}}} }} }}</includeonly><noinclude>Outputs the number of whole years since a specified date. If the date is before 1970, it can be entered directly in a variety of formats. Otherwise, it must be specified using several parameters.
+
<includeonly>{{#ifexpr:{{CURRENTMONTH}}>{{{m|{{#time:n|{{{1|}}}}}}}} or ( {{CURRENTMONTH}}={{{m|{{#time:n|{{{1|}}}}}}}} and {{CURRENTDAY}}>={{{d|{{#time:j|{{{1|}}}}}}}} )|{{#expr: {{CURRENTYEAR}} - {{{y|{{#time:Y|{{{1|}}}}}}}} }}|{{#expr: ( {{CURRENTYEAR}} - 1 ) - {{{y|{{#time:Y|{{{1|}}}}}}}} }} }}</includeonly><noinclude>Outputs the number of whole years since a specified date. If the date is on or after 1 January 1970, it can be entered directly in a variety of formats. Otherwise, it must be specified using several parameters.
===='''Usage'''====
===='''Usage'''====

Revision as of 22:59, 19 May 2009

Outputs the number of whole years since a specified date. If the date is on or after 1 January 1970, it can be entered directly in a variety of formats. Otherwise, it must be specified using several parameters.

Usage

  • {{yearssince| some date }}
  • {{yearssince| d=day | m=month | y=year }}

Examples

{{yearssince| 25 Aug 2003 }} 22
{{yearssince| January 1, 2000 }} 26
{{yearssince| 10/25/76 }} 49
{{yearssince| July 1983 }} 42
{{yearssince| 1995 }} 31
{{yearssince| d=29 | m=5 | y=1952 }} 73
{{yearssince| y=1215 }} 811