round seconds when formatting

main
Matthew Huntington 1 month ago
parent bade40c59e
commit 7ae39ec68a

@ -19,7 +19,7 @@ const getAccumulatedSeconds = (newerTime, olderTime) => {
} }
const formatSeconds = (total, includeHours = true) => { const formatSeconds = (total, includeHours = true) => {
const timeObj = createTimeObj(Math.abs(total)) const timeObj = createTimeObj(Math.abs(parseInt(total)))
let result = (total < 0) ? '-' : '' let result = (total < 0) ? '-' : ''
if(includeHours) { if(includeHours) {
result += `${timeObj.hours}:${timeObj.minutes.toString().padStart(2,'0')}` result += `${timeObj.hours}:${timeObj.minutes.toString().padStart(2,'0')}`

Loading…
Cancel
Save