Make a fist. Start on your index finger knuckle - January - go to the space between the index and middle finger - February, middle finger knuckle- March...etc. When you hit your pinky knuckle, go back to index knuckle. Any month on a knuckle has 31 days. Any month in a space has less ( 30 or 28/29 for Feb).
I could never remember the damn poem so this worked for me

Hints from Heloise