Thirty Days Hath September, April, June and November" is a traditional verse mnemonic used to remember the number of days in the months of the Julian and Gregorian calendars. It is currently earliest attested in English, but was and remains common throughout Europe as well.

Reforms credited to Romulus and Numa established a set year of twelve fixed months. Possibly under the influence of the Pythagoreans in southern Italy, Rome considered odd numbers more lucky and set the lengths of the new months to 29 and 31 days. Its imperfect system and political manipulation of intercalation caused it to slip greatly out of alignment with the solar year, which was known to consist of ¼ of 1461 days (rather than 1460 days) by the time of Meton in the 5th century BC. Rather than adopt a new system like the Egyptian calendar, which had 12 months of 30 days each. Caesar aimed for his 46 BC reform to maintain as much continuity as possible with the old calendar.

Ultimately the four existing 31-day months were maintained, February was left unchanged apart from leap years, and the needed additional ten days of the year were added to the 29-day months to make them either 30 or 31 days long.

More Info: en.m.wikipedia.org