Replacing Math.trunc by Math.floor in timeDiff.js