mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-05-13 21:30:38 +00:00
fixed formatTime comma seconds
This commit is contained in:
parent
fbfa68fac5
commit
eaa2a9d01b
1 changed files with 1 additions and 1 deletions
|
|
@ -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` : '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue