There are seven months in the year that have 31 days:Â January, March, May, July, August, October and December. The Gregorian calendar also has four months that consist each of 30 days.
The month of February is the only month of the year that has either 28 or 29 days. Every 4 years or a leap year, February has 29 days. In a leap year, a day is added to February, so that the year has 366 days instead of 365. The reason for this is so that the Gregorian calendar will be in alignment with the Earth's revolution around the sun.
Prior to the Gregorian calendar, other calendars used were the Julian and Roman calendars. Both of these calendars had 12 months. The Gregorian calendar was adopted in 1582 to reform the Julian calendar that was off by 10 days. The calendar is named after Pope Gregory XIII.