Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Duration/doc
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Module rating|beta}} {{high-use}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> This module implements {{tl|Duration}}. It tries to add a microformat to a duration (<code>hh:mm:ss</code> or <code>mm:ss</code>) whenever possible. If the module is unable to add hAudio microformat (and the input does not contain the microformat) then the page will be included in {{clc|Duration without hAudio microformat}}. == Usage == This template should normally be called through {{tl|Duration}}, and used as <code>{{((}}#invoke:Duration{{!}}main{{!}}duration=<var>duration</var>{{))}}</code> when included in other templates. Valid parameters are numbered parameters 1, 2 and 3, and unnumbered parameters {{para|h}}, {{para|m}}, {{para|s}} and {{para|duration}}. {{para|duration}} should not be used in {{tl|Duration}}, as {{para|1}} can provide the same function. The two triplets of parameters accept numbers as inputs (hours, minutes, seconds respectively). Only {{para|3}} and {{para|s}} can contain decimals; the others must be integers. The seconds value must not exceed 60, and the minutes value must not exceed 60 if there is an hours value. If the inputs are not recognized as numbers, an error message is returned. {{para|1}} and {{para|duration}} accept strings. If the string contains a microformat then the string will be returned without modification. Otherwise, the module will attempt to add an hAudio microformat to the first unformatted duration found. If the string contains more than one duration, only the first one will have a microformat added. Errors are placed in {{clc|Duration with input error}}. <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> }}</includeonly>
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:((
(
edit
)
Template:))
(
edit
)
Template:Clc
(
edit
)
Template:High-use
(
edit
)
Template:Module rating
(
edit
)
Template:Para
(
edit
)
Template:Tl
(
edit
)