fixed formatTime comma seconds

This commit is contained in:
stratumadev 2025-10-02 18:43:30 +02:00
parent fbfa68fac5
commit eaa2a9d01b

View file

@ -15,7 +15,7 @@ export default class Helper {
const days = Math.floor(t / 86400);
const hours = Math.floor((t % 86400) / 3600);
const minutes = Math.floor(((t % 86400) % 3600) / 60);
const seconds = t % 60;
const seconds = +(t % 60).toFixed(0);
const daysS = days > 0 ? `${days}d` : '';
const hoursS = daysS || hours ? `${daysS}${daysS && hours < 10 ? '0' : ''}${hours}h` : '';
const minutesS = minutes || hoursS ? `${hoursS}${hoursS && minutes < 10 ? '0' : ''}${minutes}m` : '';