Fix incorrect hour/minute calculation in simpleTimeLabel()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
f4fbae8a5c
commit
702d508d37
2 files changed
+22
-2
No files matched your search
@@ -131,8 +131,8 @@ export function simpleTimeLabel(second, fixedNumber = 0) {
|
||||
const hour = 60 * 60;
|
||||
const minutes = 60;
|
||||
const dd = Math.floor(second / day);
|
||||
const hh = Math.floor((second / hour) / day);
|
||||
const mm = Math.floor((second / hour) / minutes);
|
||||
const hh = Math.floor((second % day) / hour);
|
||||
const mm = Math.floor((second % hour) / minutes);
|
||||
|
||||
if(dd > 0){
|
||||
return (second / day).toFixed(fixedNumber) + "d";
|
||||
|
||||
Reference in new issue
Block a user