If you are feeling trouble to remember which months have 30 days or 31 days and in the same time you don't have a mobile phone or calendar on your hand, then how can you figure out this. So here is a simple hack to figure out which months have 30 days or 31 days.
Make a fist
Bend your left or right hand into a fist, depending on your handedness.
Count knuckles and grooves
If you are right-handed, then count the knuckles and grooves of your left hand starting from the pinky (little finger) excluding thumb finger or If you are left-handed, then start counting from the index finger of your right hand excluding thumb finger.
Remember the starting knuckle represent the month January and the groove next to the first knuckle represent the month February and so on. After reaching July restart counting from the first knuckle as shown in the figure.
Your knuckles represent the months with 31 days and grooves represent the months with 30 days (28/29 Feb).
Knuckles = 31 Days
Grooves = 30 Days (28/29 Feb)