修复一些错误

This commit is contained in:
masnn committed 2020-06-02 13:41:49 +08:00
1 parent bc50913e6e
commit 2b6a510c1e
23 files changed
+321 -191

No files matched your search

+6 -1
View File
@@ -49,6 +49,11 @@ function size(s, base = 1) {
return '{0} {1}'.format(Math.round(s * unit), unitNames[unitNames.length - 1]);
}
function formatSeconds(seconds) {
seconds = parseInt(seconds);
return '{:02}:{:02}:{:02}'.format(Math.floor(seconds / 3600), Math.floor((seconds % 3600) / 60), seconds % 60);
}
global.Hydro.lib.misc = module.exports = {
gravatar, datetimeSpan, paginate, size,
gravatar, datetimeSpan, paginate, size, formatSeconds,
};