Difference between revisions of "Template:Add dot minutes"

From blackwiki
Jump to navigation Jump to search
blackwiki>Wikid77
(created, as utility template, to add minutes/seconds in format "mm.ss" to total the length of musical album tracks)
 
blackwiki>GregorB
(Mv category to doc subpage)
Line 247: Line 247:
 
-- please put interwiki links on the /doc subpage!
 
-- please put interwiki links on the /doc subpage!
 
--><!--{{pp-semi|small=yes}}-->
 
--><!--{{pp-semi|small=yes}}-->
 
[[Category:Mathematical time and date function templates]]
 
 
</noinclude>
 
</noinclude>

Revision as of 09:45, 29 June 2010

-0.00

50px Template documentation[view] [edit] [history] [purge]

The Template:Add dot minutes adds times of minutes/seconds (in format "mm.ss") and displays the total (as mmm.ss). A typical usage would be to add the times of music tracks for an album. Each time is specified as a parameter (up to 50 parameters).

Usage:

{{add dot minutes|1.01|2.02|3.03}}     → 6.06
{{add dot minutes|1.11|2.22|3.33}}     → 7.06
{{add dot minutes|11.11|22.22|33.33|44.44}}     → 111.50

The template cannot handle times with colons (":") due to error "Unrecognized character" in the calculations. The total time is calculated very quickly, using the built-in MediaWiki operator "round" and parser function "padleft".