Module:Time: Difference between revisions

no edit summary
(Created page with " -- 123 => 00:02:03 function p.secondsToHMS(s) local ONE_DAY = 24 * 60 * 60 if s > ONE_DAY then return string.format('%d day%s, ', s/ONE_DAY, (math.floor(s/ONE_DAY) > 1) and "s" or "") .. os.date("!%X", s) else return os.date("!%X", s) end end -- 123 => 2 minutes, 3 seconds function p.secondsToHuman(s) if s < 60 then if s > 0 or s < 0 then return string.format('%.1f seconds', s) else return string.format('0 seconds', s) end end local days = math.f...")
 
No edit summary
Line 1: Line 1:
local p = {}


-- 123 => 00:02:03
-- 123 => 00:02:03
432

edits