mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
formating changes for time display
This commit is contained in:
parent
e94f4e2651
commit
c7c70538c3
@ -71,9 +71,9 @@ const Utils = {
|
||||
if(!end)
|
||||
end = Math.floor(Date.now()/1000);
|
||||
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)
|
||||
return Math.floor((end-start)/60) + 'minutes, ' + ((end-start)%60) + ' seconds';
|
||||
return Math.floor((end-start)/60) + ' minutes, ' + ((end-start)%60) + ' seconds';
|
||||
else
|
||||
return (end-start) + ' seconds';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user