FormatTimeSeconds
ESO Lua API function — used by 58 of the 3,030 addons we indexed (combined 13,497,236 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
FormatTimeSeconds(number timeValueInSeconds, [TimeFormatStyleCode|#TimeFormatStyleCode] formatType, [TimeFormatPrecisionCode|#TimeFormatPrecisionCode] precisionType, [TimeFormatDirectionCode|#TimeFormatDirectionCode] direction)Returns: string formattedTimeString, number nextUpdateTimeInSec
Real usage — from AUI - Advanced UI
local seconds = GetSecondsSinceMidnight()
local formattedTime = FormatTimeSeconds(seconds, TIME_FORMAT_STYLE_CLOCK_TIME, _precision, TIME_FORMAT_DIRECTION_NONE)
Short excerpt from the shipping addon AUI - Advanced UI — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| AUI - Advanced UI | 5,406,091 |
| Votan's Minimap | 4,211,718 |
| AI Research Grid | 1,195,942 |
| Character Knowledge (Research, Motif, Recipe, Furnishing Plan and Scribing Tracker) | 733,709 |
| PersonalAssistant (Banking, Consume, Junk, Loot, Repair, Worker) [Masteroshi430's branch] | 487,232 |
| Group Loot Notifier | 363,639 |