Make a fist and look at the knuckles of one hand. Each knuckle is a 31 day month and each dip between them is a short month. Starting at the first knuckle for January, run along: knuckle January 31, dip February short, knuckle March 31, dip April 30, knuckle May 31, dip June 30, knuckle July 31. Then jump to the last knuckle, or start the other fist, for August 31, and continue: dip September 30, knuckle October 31, dip November 30, knuckle December 31. The method needs no words, works in the dark, and children who learn it keep it for life. If both props fail you, there is a digital age fallback worth teaching children too: months with names ending in the pattern of the old rhyme aside, any date tool will answer instantly. But the props matter because the question usually arrives mid calculation, when stopping to look it up breaks the thread of the sum.
The classic rhyme runs: thirty days hath September, April, June and November; all the rest have thirty one, except February alone. It is older than print in some form and still the most quoted method. Its weakness is that it only lists the 30 day months and leaves you to remember that the rest are 31, plus February's special case and its leap day ending. Many people remember the first line perfectly and blur the rest. Pairing the rhyme with the knuckles covers both kinds of memory, verbal and physical, and either can check the other. Teachers have long noticed that the knuckle method survives because it is physical: the body remembers what the ear forgets. Adults who cannot recite the rhyme after forty years away from school can still run a finger along their knuckles and get every month right.
There is also structure hiding in the list. Long and short months alternate strictly from January to July, then the pattern resets with two long months together, July and August, and alternates again to December. That single irregularity, the double long month in summer, is the whole reason the sequence looks random. Remember alternation plus the July and August exception, and February as the odd one out, and the entire calendar of month lengths can be rebuilt from three facts anywhere, no props required. Whichever system you adopt, test it against the two anchors everyone knows: December has 31 days, because Christmas is followed by a 31st, and February is the special case. A method that reproduces those two and the alternation will not lead you far wrong.