get distance of the nth working hour if n<=8