Difference between revisions of "Template:Days ago"

From blackwiki
Jump to navigation Jump to search
imported>Gary
(Undid revision 272332326 by Gary King (talk))
imported>Gary
(down)
 
Line 1: Line 1:
 
<includeonly><span title="{{#time: j F Y | {{{1}}}-{{{2}}}-{{{3}}}}}">{{#ifexpr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} > 365
 
<includeonly><span title="{{#time: j F Y | {{{1}}}-{{{2}}}-{{{3}}}}}">{{#ifexpr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} > 365
 
| {{#expr: floor{{#expr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} / 365}}}}{{#ifeq: {{{short|}}} | yes | y | &nbsp;years ago }}
 
| {{#expr: floor{{#expr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} / 365}}}}{{#ifeq: {{{short|}}} | yes | y | &nbsp;years ago }}
| {{#ifexpr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} > 60
+
| {{#ifexpr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} > 30
 
| {{#expr: floor{{#expr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} / 30}}}}{{#ifeq: {{{short|}}} | yes | m | &nbsp;months ago }}
 
| {{#expr: floor{{#expr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} / 30}}}}{{#ifeq: {{{short|}}} | yes | m | &nbsp;months ago }}
 
| {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}}{{#ifeq: {{{short|}}} | yes | d | &nbsp;days ago }}
 
| {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}}{{#ifeq: {{{short|}}} | yes | d | &nbsp;days ago }}
 
}}
 
}}
 
}}</span></includeonly><noinclude>{{documentation}}</noinclude>
 
}}</span></includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 22:34, 21 February 2009

Template documentation[view] [edit] [history] [purge]

Usage

{{days ago|2008|1|1}}

Produces:

17 years ago

{{days ago|2008|1|1|short=yes}}

Produces:

17y

See also