Predloga:Time ago/dok: razlika med redakcijama

dodanih 2.975 zlogov ,  pred 8 leti
brez povzetka urejanja
(Nova stran z vsebino: {{Documentation subpage}} <!-- Kategorije in interwikiji so na dnu te strani. --> == Uporaba == == Glej tudi == <includeonly> <!-- Kategorije in interwikije vnesite tukaj...)
 
{{Documentation subpage}}
{{high-risk|100,000+}}
<!-- Kategorije in interwikiji so na dnu te strani. -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
The '''Time ago''' template calculates the amount of time which has passed since a provided timestamp. The result is a string similar to one of the examples below. This template ''should not'' be used with "subst" unless you don't want the stamp to change as the user refreshes the page.
 
Note that due to Wikipedia's caching mechanisms, you may need to [[WP:PURGE|purge]] a page using this template to update the dynamic value. See the section [[#Purge|Purge]] below.
== Uporaba ==
 
The result is rounded down. "Month" is defined as 31 days.
== Glej tudi ==
 
=== Usage ===
<includeonly>
* <code><nowiki>{{</nowiki>'''Time ago'''|''timestamp''<nowiki>}}</nowiki></code>
<!-- Kategorije in interwikije vnesite tukaj: -->
 
The timestamp can be almost any solid, readable format but to avoid ambiguity mistakes, one of the styles below is preferred.
 
* <code>magnitude</code> parameter can be set to explicitly use certain unit. Allowed values are: <code>seconds</code>, <code>minutes</code>, <code>hours</code>, <code>days</code>, <code>weeks</code>, <code>months</code> and <code>years</code>.
* <code>min_magnitude</code> parameter can be set to use the specified unit or bigger units. Allowed values are: <code>seconds</code>, <code>minutes</code>, <code>hours</code>, <code>days</code>, <code>months</code> and <code>years</code>.
* <code>ago</code> parameter can be set to override the default usage of the text "<code>ago</code>".
 
==== Purge ====
Add the parameter {{para|purge|yes}} to add a [[WP:PURGE|purge]] link.
 
=== Examples ===
* <tt><nowiki>{{Time ago| -83 minutes}}</nowiki></tt> → '''{{Time ago|-83 minutes}}'''
* <tt><nowiki>{{Time ago| -334 minutes}}</nowiki></tt> → '''{{Time ago|-334 minutes}}'''
* <tt><nowiki>{{Time ago|{{REVISIONTIMESTAMP}}}}</nowiki></tt> → '''{{Time ago|{{REVISIONTIMESTAMP}}}}'''
* <tt><nowiki>{{Time ago| Jan 21, 2001 3:45 PM}}</nowiki></tt> → '''{{Time ago|Jan 21 2001 3:45 PM}}'''
* <tt><nowiki>{{Time ago| Nov 6 2008}}</nowiki></tt> → '''{{Time ago|Nov 6 2008}}'''
* <tt><nowiki>{{Time ago| Nov 6 2008|magnitude=weeks}}</nowiki></tt> → '''{{Time ago| Nov 6 2008|magnitude=weeks}}'''
* <tt><nowiki>{{Time ago| Nov 6 2008|min_magnitude=days}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|min_magnitude=days}}'''
* <tt><nowiki>{{Time ago| Nov 6 2008|min_magnitude=years}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|min_magnitude=years}}'''
* <tt><nowiki>{{Time ago| Nov 6 2008|ago=in the past}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|ago=in the past}}'''
* <tt><nowiki>{{Time ago| Nov 6 2008|purge=yes}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|purge=yes}}'''
 
=== GlejSee tudialso ===
* {{tl|LastEditedBy}}
 
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Mathematical time and date function templates]]
[[af:Sjabloon:Tyd_gelede]]
[[ar:قالب:Time ago]]
[[en:Template:Time ago]]
[[es:Plantilla:Edad en tiempo]]
[[fr:Modèle:Time ago]]
[[id:Templat:Time ago]]
[[hy:Կաղապար:Time ago]]
[[mk:Шаблон:Пред]]
[[ja:Template:Time ago]]
[[ko:틀:이전 시간]]
[[sv:Mall:Tid sedan]]
[[uk:Шаблон:Time ago]]
[[zh:Template:Time ago]]
</includeonly>
402

urejanji