Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API SecondsToTimeAbbrev
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__ TimeFormat, Value = SecondsToTimeAbbrev(TimeDuration); Converts an amount of time (TimeDuration) into a formatted string (TimeFormat) and value. == Parameters == === Arguments === :;TimeDuration : Number - The amount of time to convert. === Returns === :;TimeFormat : String - A string in the format "%d s|m|h|d" :;Value : Number - The seconds, minutes, hours, or days that will fit into the formated string. == Example == Results below, respectively local msg, val = SecondsToTimeAbbrev(30) output = format(msg, val) DEFAULT_CHAT_FRAME:AddMessage(output) local msg, val = SecondsToTimeAbbrev(900) output = format(msg, val) DEFAULT_CHAT_FRAME:AddMessage(output) local msg, val = SecondsToTimeAbbrev(3600) output = format(msg, val) DEFAULT_CHAT_FRAME:AddMessage(output) local msg, val = SecondsToTimeAbbrev(86400) output = format(msg, val) DEFAULT_CHAT_FRAME:AddMessage(output) === Result === 30 s 15 m 1 h 1 d == Details ==
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
)