I found today that my PHP Calendar Class didn’t cope at all well with months that span more than five weeks. August 2021 is a good example – it covers six Monday-to-Sunday weeks, and my code was assuming that it would only need to worry about four or five such weeks.
I’ve now updated the code in the original post.