|
|
| (12 intermediate revisions by 8 users not shown) |
| Line 1: |
Line 1: |
| {{#iferror: {{#time:U| {{{1|}}} }} | | {{#invoke:Time ago|main}}<noinclude> |
| |{{error|Error: first parameter cannot be parsed as a date or time.}}
| |
| |{{#if: {{{magnitude|}}}
| |
| |{{#expr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / {{#switch:{{{magnitude}}}
| |
| |minutes = 60
| |
| |hours = 3600
| |
| |days = 86400
| |
| |weeks = 604800
| |
| |months = 2678400
| |
| |years = 31557600
| |
| |#default= 1
| |
| }} ) }} {{#switch:{{{magnitude}}}
| |
| |minutes
| |
| |hours
| |
| |days
| |
| |weeks
| |
| |months
| |
| |years = {{{magnitude}}}
| |
| |#default= seconds
| |
| }}
| |
| | <!-- No specific magnitude -->{{#switch:{{#expr:
| |
| {{#ifexpr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 120 ) | 1 | 0 }}+
| |
| {{#ifexpr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 7200 ) | 1 | 0 }}+
| |
| {{#ifexpr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 172800 ) | 1 | 0 }}+
| |
| {{#ifexpr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 5356800 ) | 1 | 0 }}+
| |
| {{#ifexpr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 63115200 ) | 1 | 0 }}
| |
| }}
| |
| |0 = {{#expr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 1 ) }} seconds
| |
| |1 = {{#expr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 60 ) }} minutes
| |
| |2 = {{#expr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 3600 ) }} hours
| |
| |3 = {{#expr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 86400 ) }} days
| |
| |4 = {{#expr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 2678400 ) }} months
| |
| |5 = {{#expr: floor( abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) / 31557600 ) }} years
| |
| }}
| |
| }}{{#ifexpr: {{#time:U}} - {{#time:U| {{{1|}}} }} >= 0
| |
| | ago
| |
| |' time
| |
| }}
| |
| }}<noinclude> | |
| {{documentation}} | | {{documentation}} |
| | <!-- Categories go in the /doc subpage and interwikis go in Wikidata. --> |
| </noinclude> | | </noinclude> |
0 seconds ago
Lua error in package.lua at line 80: module 'Module:Documentation/config' not found.