Commit: 53d853ac38f9237151b92967efb65d950bde852f
Parent: 3fdba96ea1687be39bbb87aba247ad414b8d9d46
Author: Ren Tatsumoto
Date: Sun, 4 Oct 2020 15:07:43 +0300
reformat time parts
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -207,12 +207,12 @@ local function human_readable_time(seconds)
return 'empty'
end
- local parts = {}
-
- parts.h = math.floor(seconds / 3600)
- parts.m = math.floor(seconds / 60) % 60
- parts.s = math.floor(seconds % 60)
- parts.ms = math.floor((seconds * 1000) % 1000)
+ local parts = {
+ h = math.floor(seconds / 3600),
+ m = math.floor(seconds / 60) % 60,
+ s = math.floor(seconds % 60),
+ ms = math.floor((seconds * 1000) % 1000),
+ }
local ret = string.format("%02dm%02ds%03dms", parts.m, parts.s, parts.ms)