2,875
edits
m (Fix incorrect day calculation) |
m (Don't show days if daycount = 0) |
||
Line 10: | Line 10: | ||
local days = math.floor(timeInHundredths / (3600000 * 24)) | local days = math.floor(timeInHundredths / (3600000 * 24)) | ||
local formatString = "%d days %02dh %02dm %02ds" | |||
if days == 0 then | |||
formatString = "%02dh %02dm %02ds" | |||
end | |||
return string.format(formatString, days, hrs % 24, min % 60, sec % 60) | |||
end | end | ||
edits