Why are there 12 months in the year?
Julius Caesar’s astronomers explained the need for 12 months in a year and the addition of a leap year to synchronize with the seasons. At the time, there were only ten months in the calendar while there are just over 12 lunar cycles in a year.
The months of January and February were added to the calendar and the original fifth and sixth months were renamed July and August in honour of Julius Caesar and his successor Augustus.
These months were both given 31 days to reflect their importance, having been named after Roman leaders.
Wiki Answers link