Get the number of weeks from 1 month

can you help me, I want to get the number of weeks from 1 month. For example, July= 6 weeks & September = 5 weeks. Thank you for the help.

numOfWeeks := DATE2DWY(31072023D,2) - DATE2DWY(01072023D,2)