DiffHours rewrite

function DiffHours was overhauled in order to correct bugs