Change manual time formatting to dayjs time fomatting. #39

Merged
alekswilc merged 5 commits from dev into main 2024-08-27 20:37:53 +02:00
Showing only changes of commit 00d10a1649 - Show all commits

View File

@ -15,10 +15,13 @@ export const msToTime = (duration: number, long = false) => {
if (long) { if (long) {
let t = ''; let t = '';
if (time.days()) t+= `${time.days()}d `;
if (time.hours()) t+= `${time.hours()}h `; if (time.hours()) t+= `${time.hours()}h `;
if (time.minutes()) t+= `${time.minutes()}m `; if (time.minutes()) t+= `${time.minutes()}m `;
if (time.seconds()) t+= `${time.seconds()}s`; if (time.seconds()) t+= `${time.seconds()}s`;
if (!t) t = '1s';
return `${time.humanize()} (${t})`; return `${time.humanize()} (${t})`;
} }