File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -46,27 +46,23 @@ function CustomChat.NiceTime( time )
46
46
local d = time % 7
47
47
local w = Floor ( time / 7 )
48
48
49
- local parts = {}
50
-
51
49
if w > 0 then
52
- parts [ # parts + 1 ] = w .. " " .. L ( " time.weeks" )
50
+ return w .. " " .. L ( " time.weeks" )
53
51
end
54
52
55
53
if d > 0 then
56
- parts [ # parts + 1 ] = d .. " " .. L ( " time.days" )
54
+ return d .. " " .. L ( " time.days" )
57
55
end
58
56
59
57
if h > 0 then
60
- parts [ # parts + 1 ] = Format ( " %02i " , h ) .. L ( " time.hours" )
58
+ return Format ( " %02i " , h ) .. L ( " time.hours" )
61
59
end
62
60
63
- if m > 0 then
64
- parts [ # parts + 1 ] = Format ( " %02i " , m ) .. L ( " time.minutes" )
61
+ if m > 0 and h < 1 and d < 1 then
62
+ return Format ( " %02i " , m ) .. L ( " time.minutes" )
65
63
end
66
64
67
- parts [# parts + 1 ] = Format ( " %02i " , s ) .. L ( " time.seconds" )
68
-
69
- return table.concat ( parts , " " )
65
+ return Format ( " %02i " , s ) .. L ( " time.seconds" )
70
66
end
71
67
72
68
function CustomChat .PrintMessage ( text )
You can’t perform that action at this time.
0 commit comments