export function formatTimeDuration ( timeInSeconds ) { const seconds = timeInSeconds % 60 ; timeInSeconds = Math . floor ( timeInSeconds / 60 ) ; const minutes = timeInSeconds % 60 ; timeInSeconds = Math . floor ( timeInSeconds / 60 ) ; const hours = timeInSeconds % 24 ; const days = Math . floor ( timeInSeconds / 24 ) ; return { days : ( '0' + days ) . slice ( - 2 ) , hours : ( '0' + hours ) . slice ( - 2 ) , minutes : ( '0' + minutes ) . slice ( - 2 ) , seconds : ( '0' + seconds ) . slice ( - 2 ) } ; }