Difference between revisions of "Template:Add colon minutes"

From blackwiki
Jump to navigation Jump to search
blackwiki>Wikid77
(removed if-expression which bypasses 19-50 of {padleft: |...} at parameter 19)
blackwiki>GregorB
(Moved cat to doc subpage)
Line 262: Line 262:
 
-- 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:43, 29 June 2010

Expression error: Unrecognized punctuation character ":".:Expression error: Unrecognized punctuation character "[".

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

The Template:Add_colon_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 colon minutes|1:01|2:02|3:03}}     → 6:06
{{add colon minutes|3:30|2:40|20:07}}    → 26:17

The template cannot handle times with dots (".") due to checking the position of the colon, in the calculations. The total time is calculated using the MediaWiki parser function "padleft" and the highly complex substring template {{str_rightc}}.

See also