Difference between revisions of "Template:Time ago/core"
m (Changed protection level of Template:Time ago/core: Highly visible template ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
RealRecipes (talk | contribs) m (1 revision) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | {{# | + | {{#expr:floor(abs({{#time:U}}-{{#time:U|{{{time|}}}}})/{{#switch:{{#ifexpr:{{{min_magnitude_num|-1}}}>{{{auto_magnitude_num}}} |
| − | + | |{{{min_magnitude_num}}} | |
| − | + | |{{{auto_magnitude_num|0}}} | |
| − | |1 = | + | }} |
| − | |2 = | + | |0 = 1 |
| − | |3 = | + | |1 = 60 |
| − | |4 = | + | |2 = 3600 |
| − | |5 = | + | |3 = 86400 |
| − | |6 = | + | |4 = 604800 |
| − | + | |5 = 2678400 | |
| − | + | |6 = 31557600 | |
| − | |0 = {{ | + | |#default=1 |
| − | |1 = {{ | + | }})}} {{#switch:{{#ifexpr:{{{min_magnitude_num|-1}}}>{{{auto_magnitude_num|0}}} |
| − | |2 = {{ | + | |{{{min_magnitude_num}}} |
| − | |3 = {{ | + | |{{{auto_magnitude_num|0}}} |
| − | |4 = {{ | + | }} |
| − | |5 = {{ | + | |0 = {{PLURAL:{{#expr:floor(abs{{#time:U}}-{{#time:U|{{{time|}}}}}}})|second|seconds}} |
| − | |6 = {{ | + | |1 = {{PLURAL:{{#expr:floor(abs({{#time:U}}-{{#time:U|{{{time|}}}}}))/60}}|minute|minutes}} |
| − | }} time | + | |2 = {{PLURAL:{{#expr:floor(abs({{#time:U}}-{{#time:U|{{{time|}}}}}))/3600}}|hour|hours}} |
| − | }} | + | |3 = {{PLURAL:{{#expr:floor(abs({{#time:U}}-{{#time:U|{{{time|}}}}}))/86400}}|day|days}} |
| + | |4 = {{PLURAL:{{#expr:floor(abs({{#time:U}}-{{#time:U|{{{time|}}}}}))/604800}}|week|weeks}} | ||
| + | |5 = {{PLURAL:{{#expr:floor(abs({{#time:U}}-{{#time:U|{{{time|}}}}}))/2678400}}|month|months}} | ||
| + | |6 = {{PLURAL:{{#expr:floor(abs({{#time:U}}-{{#time:U|{{{time|}}}}}))/31557600}}|year|years}} | ||
| + | }}{{#ifexpr:{{#time:U}}-{{#time:U|{{{time|}}}}}>=0 | ||
| + | | ago | ||
| + | |' time | ||
| + | }}<noinclude>[[Category:Template subpages|{{PAGENAME}}]]</noinclude> | ||
Latest revision as of 16:33, 25 March 2012
0 seconds ago