So, I perform this calculation on a phone: (((7 - 8)+ 2) %7) and the result is 9.
it’s a calculation to get the next X day of the weeks date. I am specifically getting the date of the next Monday (9th)from the current Sunday. (8th) although intend to use it for other days too.
But when I perform it in my code it returns 0. Why?
I don’t think the calculation is necessarily the correct one, I’ve been playing around but I am curious as to why it provides two different answers.