Lore archive · Warcraft Wiki, 2023 dump
API SecondsToTimeAbbrev
Last wiki revision 2008-07-15
TimeFormat, Value = SecondsToTimeAbbrev(TimeDuration);
Converts an amount of time (TimeDuration) into a formatted string (TimeFormat) and value.
- TimeDuration : Number - The amount of time to convert.
- 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.
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)
30 s
15 m
1 h
1 d
Source
https://warcraft.wiki.gg/wiki/API_SecondsToTimeAbbrev · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.