Difference between revisions of "Template:Add colon minutes"
Jump to navigation
Jump to search
blackwiki>Wikid77 (changed use of {str_rightc|{1}|2 |0} to immediately return param. 3 as zero, when each time parameter is empty, as perhaps 1,000x times faster) |
blackwiki>Wikid77 (removed if-expression which bypasses 19-50 of {padleft: |...} at parameter 19) |
||
| Line 25: | Line 25: | ||
+ {{padleft:|{{#ifeq:{{substr|{{{17|0}}}|1|1}}|:|1|2}}|{{{17|0}}}}} | + {{padleft:|{{#ifeq:{{substr|{{{17|0}}}|1|1}}|:|1|2}}|{{{17|0}}}}} | ||
+ {{padleft:|{{#ifeq:{{substr|{{{18|0}}}|1|1}}|:|1|2}}|{{{18|0}}}}} | + {{padleft:|{{#ifeq:{{substr|{{{18|0}}}|1|1}}|:|1|2}}|{{{18|0}}}}} | ||
| − | |||
+ {{padleft:|{{#ifeq:{{substr|{{{19|0}}}|1|1}}|:|1|2}}|{{{19|0}}}}} | + {{padleft:|{{#ifeq:{{substr|{{{19|0}}}|1|1}}|:|1|2}}|{{{19|0}}}}} | ||
+ {{padleft:|1|{{{20|0}}} }} <!-- | + {{padleft:|1|{{{20|0}}} }} <!-- | ||
| Line 58: | Line 57: | ||
--> + {{padleft:|1|{{{49|0}}} }} <!-- | --> + {{padleft:|1|{{{49|0}}} }} <!-- | ||
--> + {{padleft:|1|{{{50|0}}} }} <!-- | --> + {{padleft:|1|{{{50|0}}} }} <!-- | ||
| − | |||
--> ) + ( <!-- | --> ) + ( <!-- | ||
--------------------------------------- Plus carried minutes | --------------------------------------- Plus carried minutes | ||
Revision as of 07:14, 8 May 2010
Expression error: Unrecognized punctuation character ":".:Expression error: Unrecognized punctuation character "[".
|
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:
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}}.
|
| The above documentation is transcluded from Template:Add colon minutes/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |