Date formula hurts my head, have you seen it before and how does it work?

I can't quite get my head around it but I partly follow it.

It's a way of fudging the number of days in a month.

30.6 is the average number of days in a month excluding Jan and Feb.
((month + 9) % 12) is doing two things:

It converts the month number from 1-12 to 0-11.
It adds ten to the month. Multiply that by the average-days-per-month for Mar-Dec, add in 58.5 representing the number of days in Jan+Feb, and you have added a year's worth of days to the date. Since the final answer is mod 365, that doesn't affect the answer.

I can kinda vaguely see how that might be producing the right answer, but it still feels like a most extraordinary cheat to me.