Difference between revisions of "Template:Days ago"
Jump to navigation
Jump to search
imported>Gary (add years) |
imported>Gary (plural) |
||
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 | years ago }} | + | | {{#expr: floor{{#expr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} / 365}}}}{{#ifeq: {{{short|}}} | yes | y | {{plural:floor{{#expr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} / 365}}|year|years}} ago }} |
| {{#ifexpr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} > 60 | | {{#ifexpr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} > 60 | ||
− | | {{#expr: floor{{#expr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} / 30}}}}{{#ifeq: {{{short|}}} | yes | m | months ago }} | + | | {{#expr: floor{{#expr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} / 30}}}}{{#ifeq: {{{short|}}} | yes | m | {{plural:floor{{#expr: {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}} / 30}}|month|months}} ago }} |
− | | {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}}{{#ifeq: {{{short|}}} | yes | d | days ago }} | + | | {{age in days|{{{1}}}|{{{2}}}|{{{3}}}}}{{#ifeq: {{{short|}}} | yes | d | {{plural:{{age in days|{{{1}}}|{{{2}}}|{{{3}}}}}|day|days}} ago }} |
}} | }} | ||
}}</span></includeonly><noinclude>{{documentation}}</noinclude> | }}</span></includeonly><noinclude>{{documentation}}</noinclude> |
Revision as of 20:25, 21 February 2009
Usage
{{days ago|2008|1|1}}
Produces:
17 years ago
{{days ago|2008|1|1|short=yes}}
Produces:
17y
See also
- {{age in days}}
The above documentation is transcluded from Template:Days ago/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |