Difference between revisions of "Template:How long ago"

From blackwiki
Jump to navigation Jump to search
imported>PC78
m (moved Template:How Long Ago to Template:How long ago: capitalisation)
imported>Primefac
m (Protected "Template:How long ago": semi-protection of high-usage templates to combat systematic vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (indefinite)))
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{How Long Ago/Exp|{{ #ifexpr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 > {{{month|12}}}
+
#REDIRECT [[Template:Age in years, months and days]]
| {{ #expr: {{ #expr: ((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0}} - {{{year|2005}}} }}
+
{{r from duplicated article}}
| {{ #ifexpr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 < {{{month|12}}}
 
    | {{ #expr: {{ #expr: ((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0}} - {{{year|2005}}} - 1 }}
 
    | {{ #ifexpr: (((({{#time: YmdHis}} / 1000000) round 0))) - (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0)*100 >= {{{day|31}}}
 
      | {{ #expr: {{ #expr: ((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0}} - {{{year|2005}}} }}
 
      | {{ #expr: {{ #expr: ((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0}} - {{{year|2005}}} - 1 }}
 
      }}
 
  }}
 
}}|{{#ifexpr: (((({{#time: YmdHis}} / 1000000) round 0))) - (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0)*100 >= {{{day|31}}}
 
| {{#ifexpr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 - {{{month|31}}} >= 0
 
    | {{#expr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 - {{{month|12}}} }}
 
    | {{ #expr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 - {{{month|12}}} + 12 }}
 
  }}
 
| {{#ifexpr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 - {{{month|31}}} > 0
 
    | {{ #expr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 - {{{month|12}}} - 1 }}
 
    | {{ #expr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 - {{{month|12}}} + 11 }}
 
  }}
 
}}|{{#ifexpr: (((({{#time: YmdHis}} / 1000000) round 0))) - (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0)*100 >= {{{day|31}}} | {{ #expr: {{ #expr: (((({{#time: YmdHis}} / 1000000) round 0))) - (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0)*100 }} - {{{day|31}}} }} | {{#ifexpr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 5 or (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 7 or (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 10 or (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 12 | {{ #expr: {{ #expr: (((({{#time: YmdHis}} / 1000000) round 0))) - (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0)*100 }} - {{{day|31}}} + 30 }} | {{#ifexpr: (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 1 or (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 2 or (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 4 or (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 6 or (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 8 or (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 9 or (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0) - (((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0)*100 = 11 | {{ #expr: {{ #expr: (((({{#time: YmdHis}} / 1000000) round 0))) - (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0)*100 }} - {{{day|31}}} + 31 }} | {{#ifexpr: ((({{#time: YmdHis}} / 1000000) round 0)) /10000 round 0 mod 4 = 0 | {{ #expr: {{ #expr: (((({{#time: YmdHis}} / 1000000) round 0))) - (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0)*100 }} - {{{day|31}}} + 29 }} | {{ #expr: {{ #expr: (((({{#time: YmdHis}} / 1000000) round 0))) - (((({{#time: YmdHis}} / 1000000) round 0)) /100 round 0)*100 }} - {{{day|31}}} + 28 }} }} }} }}}}}}<noinclude>
 
 
 
This template was based on "[[Template:User Wikipedian For]]", which was itself translated from the [[:he:תבנית:משתמש בוויקיפדיה|Hebrew Wikipedia]].
 
=== Example usage ===
 
<table class="wikitable">
 
<tr>
 
<th>Code</th><th>Result</th>
 
</tr>
 
<tr>
 
<td><nowiki>{{How Long Ago|year=2004|month=3|day=10}}</nowiki></td><td>{{How Long Ago|year=2004|month=3|day=10}}</td>
 
</tr>
 
<tr>
 
<td><nowiki>This template was created {{How Long Ago|year=2007|month=11|day=20}} ago</nowiki></td><td>This template was created {{How Long Ago|year=2007|month=11|day=20}} ago</td>
 
</tr>
 
</table>
 
[[Category:Date mathematics templates|{{PAGENAME}}]]
 
</noinclude>
 

Latest revision as of 00:30, 19 January 2018

  • From a duplicated article: This is a redirect from a page on the same or very similar subject matter that was kept as a redirect to preserve this page's edit history after the content was merged.
    • Please do not delete this redirect nor remove this tag unless the need to recreate this article is demonstrated.