修正string扩展模块时间转换函数可能出现1分60(截断小数点后两位防止被向上取整)
This commit is contained in:
@@ -63,9 +63,9 @@ function STRING.time(t)
|
|||||||
if t<60 then
|
if t<60 then
|
||||||
return format("%.3f\"",t)
|
return format("%.3f\"",t)
|
||||||
elseif t<3600 then
|
elseif t<3600 then
|
||||||
return format("%d'%05.2f\"",int(t/60),t%60)
|
return format("%d'%05.2f\"",int(t/60),int(t%60*100)/100)
|
||||||
else
|
else
|
||||||
return format("%d:%.2d'%05.2f\"",int(t/3600),int(t/60%60),t%60)
|
return format("%d:%.2d'%05.2f\"",int(t/3600),int(t/60%60),int(t%60*100)/100)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user