"टेम्पलेट:Time ago" की अवतरण में अंतर

overhaul
(Trying to simplify template design)
imported>Happy-melon
(overhaul)
{{#switch: <!--WHAT 'ORDER OF MAGNITUDE' IS THE OFFSET?-->
{{#switch:
{{#ifexpr: abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) </ 18060 round 0 | 1 | 0 }}+
|default= {{#exprifexpr: abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) /604800 3600 round 0 }}| weeks1 ago| 0 }}+
| 0
| {{#exprifexpr: truncabs( 1.4427 * ln( ({{#time:U}} - {{#time:U| {{{1|}}} }}) ) -/ 7.3987)86400 round 0 | 1 | 0 }}+
|9 <!-- < 1 day --> = {{#exprifexpr: abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) /3600 2678400 round 0 }}| 1 hours| ago0 }}+
}}
|0 <!-- < 3 min --> = less than 3 minutes ago
| 0 <!--LESS THAN A MINUTE--> = {{#expr: abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) }} seconds
|1 <!-- < 6 min -->
|2 1 <!--LESS < 12 minTHAN AN HOUR--> = {{#expr: abs( {{#time:U}} - {{#time:U| {{{1|}}} }} )/60 round 0 }} minutes ago
| 2 <!--LESS THAN A DAY--> = {{#expr: abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) }} hours
|3 <!-- < 23 min -->
| 3 <!--LESS THAN A MONTH--> = {{#expr: abs( {{#time:U}} - {{#time:U| {{{1|}}} }} ) }} days
|4 <!-- < 45 min -->
|5 4 <!--OVER < 90 min A MONTH--> = {{#expr: abs( {{#time:U}} - {{#time:U| {{{1|}}} }} )/12 round 0 * 5}} minutes agomonths
 
|6 <!-- < 3 hours -->
|7 <!-- < 6 hours --> = }}{{#exprifexpr: abs( {{#time:U}} - {{#time:U| {{{1|}}} }} )/3600 round| 1&#32;ago | }}' hourstime ago}}<noinclude>
 
|8 <!-- < 12 hours-->
|9 <!-- < 1 day --> = {{#expr: ({{#time:U}} - {{#time:U|{{{1|}}}}})/3600 round 0 }} hours ago
|10<!-- < 2 days --> = Yesterday
|11<!-- < 4 days -->
|12<!-- < 8 days --> = {{#time:l|{{{1|}}}}}
|default= {{#expr: ({{#time:U}} - {{#time:U|{{{1|}}}}})/604800 round 0 }} weeks ago
}}<noinclude>
{{documentation|content=
{{tl|{{PAGENAME}}}} calculates dates and times since an event has passed.
नामालूम प्रयोगकर्ता