Difference between revisions of "Template:Display duration"

From Wikispooks
Jump to navigation Jump to search
(Created page with "<noinclude>Category:String manipulation templatesThis template calculate the duration of any object with a start date. If it has no end date, then it gives the duration up...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>[[Category:String manipulation templates]]This template calculate the duration of any object with a start date.
+
<noinclude>[[Category:Property Templates]]This template uses [[Template:FormatDuration]] to create the [[Property:Display duration]] for [[Job]] items have a [[Property:Start]].</noinclude><includeonly>[[Display duration::{{FormatDuration|{{#show: {{PAGENAME}} | ?Start}}|{{#show: {{PAGENAME}} | ?End}}}}]]</includeonly>
If it has no end date, then it gives the duration up to today.<br/>
 
Usage:<br/>
 
<pre>{{FormatDuration|Start|End}}</pre>
 
</noinclude><includeonly>{{#if: {{{1|}}}|
 
{{#if:{{{2|}}}|{{date difference|{{#time: Y |{{{1|}}} }}|{{#time: m |{{{1|}}} }}|{{#time: d |{{{1|}}} }}|{{#time: Y |{{{2|}}} }}|{{#time: m |{{{2|}}} }}|{{#time: d |{{{2|}}} }}}}|{{date difference|{{#time: Y |{{{1|}}} }}|{{#time: m |{{{1|}}} }}|{{#time: d |{{{1|}}} }}}}</includeonly>
 

Latest revision as of 12:05, 6 July 2016

This template uses Template:FormatDuration to create the Property:Display duration for Job items have a Property:Start.