var minutes = Math.round(delta / (60*1000)); var hours = Math.floor( minutes / 60 ); minutes -= hours * 60;