why don't you just use division and modulo operation, to calculate the weeks and remaining days
example:
days = 75
75 / 7 = 10 , works since you divide integers
75 % 7 = 5 , modulo operation, returns the rest of the division
=> 75days = 10 weeks and 5 days