Template:Add dot minutes

From blackwiki
Jump to navigation Jump to search

-0.00

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".