1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-09-27 22:13:43 +00:00

formating changes for time display

This commit is contained in:
palica 2017-12-01 11:22:39 +01:00 committed by Oliver Giles
parent e94f4e2651
commit c7c70538c3

View File

@ -71,9 +71,9 @@ const Utils = {
if(!end) if(!end)
end = Math.floor(Date.now()/1000); end = Math.floor(Date.now()/1000);
if(end - start > 3600) if(end - start > 3600)
return Math.floor((end-start)/3600) + 'hours, ' + Math.floor(((end-start)%3600)/60) + ' minutes'; return Math.floor((end-start)/3600) + ' hours, ' + Math.floor(((end-start)%3600)/60) + ' minutes';
else if(end - start > 60) else if(end - start > 60)
return Math.floor((end-start)/60) + 'minutes, ' + ((end-start)%60) + ' seconds'; return Math.floor((end-start)/60) + ' minutes, ' + ((end-start)%60) + ' seconds';
else else
return (end-start) + ' seconds'; return (end-start) + ' seconds';
} }