Add tests for formatDuration

This commit is contained in:
manubo
2019-10-10 14:55:21 +02:00
parent 6de449ed85
commit a6956b3a01
2 changed files with 19 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ export const formatDuration = (
if (settingTimeTrackingHHMM) {
const hours = Math.floor(durationInSeconds / 3600)
const minutes = Math.floor((durationInSeconds % 3600) / 60)
const result = `${padCharsStart("0", 2, hours)}:${padCharsStart("0", 2, minutes)}`
const result = `${hours}:${padCharsStart("0", 2, minutes)}`
if (!showSeconds) {
return result
} else {