Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API SecondsToTime
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!
<br>{{framexmlfunc|FrameXML/UIParent.lua}} __NOTOC__ timePassed = SecondsToTime(seconds[, noSeconds]); Is defined in UIParent.lua as: function SecondsToTime(seconds, noSeconds, notAbbreviated, maxCount) Converts a number of seconds into a localized, user readable timespan. == Parameters == === Arguments === : seconds, noSeconds :;seconds : Number - The number of seconds to be represented. :;noSeconds : [[Boolean]] (optional) - If ''true'', seconds are omitted from the output. (Omitting it == ''false'') === Returns === :;timePassed : String - Formatted, localized string representing the specified number of seconds. == Example == local timePassed = SecondsToTime(5461) DEFAULT_CHAT_FRAME:AddMessage("5461 seconds is approximately " .. timePassed) === Result === 5461 seconds is approximately 1 Hr 31 Mins == Details == : Converts a number of seconds to a user readable timespan. The exact result differs for each client language. : Regardless of the ''noSeconds'' parameter, the function never returns more than two different time units of precision. i.e. if ''seconds'' is greater than 3600, seconds will be omitted. If it is greater than 86400, minutes will also be omitted.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Framexml
(
edit
)
Template:Framexmlfunc
(
edit
)
Template:Icon-information
(
edit
)
Template:Wowapi
(
edit
)
Template:Wowtoolsfilelink
(
edit
)