mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
修复一些错误
This commit is contained in:
1 parent
bc50913e6e
commit
2b6a510c1e
23 files changed
+321
-191
No files matched your search
+6
-1
@@ -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,
|
||||
};
|
||||
Reference in new issue
Block a user