I have to admit - I never even thought that there would be an easier math-formula way to calculate it. Though I would have written the switch:
case "september":
case "april":
case "june":
case "november": return 30;
It's sad, but still need to go through the poem in my head to remember most of the time.