Our calendar comes from the ancient Romans, and is based on the sun. But before the Romans began to use their solar calendar, they used a lunar calendar, based on the moon.
A real month is the time it takes the moon to go around the earth, about 29.5 days. So the Romans gave their months 29 or 30 days. But their 12 months added up to only 354 days, so they had to add a short month of 11 days to the year from time to time.
During Julius Caesar’s reign, the Romans began to use a solar calendar instead of a lunar calendar. The Romans took the extra 11 days in the solar year and divided them up among the other months, making the first, third, fifth, seventh, ninth, and eleventh months each 31 days long. Then they took a day away from February, so that the 12 months contained exactly 365 days.
Some historians think that Augustus Caesar took a day from September and added it to August, the month named after Augustus, and also moved a day from November to December.
That’s why August and December now have 31 days, and September and November have 30. But there’s no proof that this is the way it really happened.