The nowadays calendar was first formulated in several inaccurate variations by the Romans based on methods developed by the Babylonians and Egyptians. The aim of all these calendars was to harmonize the cycles of the Moon and the Sun. During Julius Caesar's reign, January was falling in autumn so he ordered Sosigenes to make changes to the calendar. He added 90 days to the year 46 BC to make up for the seasonal drift and adjusted the lengths of the months similarly as we know them to be today. He introduced the leap year by adding one day to February every four years. For the present, the leap year regulation was made in the way that all four years after the 23rd day in February a leap day was laid in, so the 24th February occurred twice. The use of the leap year was an improvement but not entirely accurate.
But in the later years, the leap rule was used in the wrong way so that the errors are corrected by emperor Augustus in the year 8 BC. A curious sequel happened on this occasion. Because Augustus reacted with great jealousy to all things previously made and propagated by Julius Caesar, he did not like Caesar's name in the calendar, namely the today's month of July. Offhandedly he ordered to name another month to himself and so the month name August arose. Furthermore, Augustus did not tolerate the fact that his month of birth (the August) was shorter than Caesar's month in the sense of the periodical sequence of months with 30 and 31 days. Consequently, the month of August got 31 days, too. Due to this modification, the number of days in February were reduced to 28 and 29 days, respectively, so the 29th February was designed to be the leap day now.
This calendar is well known under the term Julian calendar and is based on a plain solar year. The nominal length of a solar year (respectively a so-called tropical year) is 365 days, 5 hours, 48 minutes, and 46 seconds. One 366-day year every four years equates to an average Julian year of 365 days and 6 hours, consequently to 365.25 days. This means, every four years, an error of 44 minutes, 56 seconds was accumulated by this kind of calendar calculation. Because of this counting method, the length of the years becomes a bit too long, by more than 11 minutes.
By the 16th century, the vernal equinox occurred around March 11, rather than March 21, by reason of an accumulated error of ten days. The feast of Easter shifted away more and more from the habitual vernal date, which must have always been celebrated on an earlier date. So Pope Gregory XIII introduced the new style calendar in 1582. Thursday, the 4th October 1582, was followed by Friday, the 15th October, by suppressing the ten days between both dates. Moreover, he ordained that years ending in hundreds should not be leap years unless they are divisible by 400. Incidentally, the Gregorian reform compensates by 72 hours (3 days) every 400 years. The actual excess accumulated is 74 hours, 53 minutes and 20 seconds. The error of 2 hours, 53 minutes and 20 seconds every 400 years accumulates to one day in about 3300 years. Thereby, the Gregorian year has an average length of 365.2425 days.
But this Gregorian calendar was accepted very slowly by others. Catholic countries adopted the Gregorian calendar almost immediately. Most Protestant countries on the Continent adopted the new calendar around 1700. England and the American colonies changed in 1752, by act of Parliament. Orthodox Christian countries adopted the Gregorian calendar later. Russia was the last European country to do so, after the communist revolution of 1917. As a result, the former U.S.S.R. celebrated the October Revolution (happened on October 25th, 1917) in the old style calendar on November 7th.
The era of a world wide uniform calendar is already part of history today. The Iran returned to the traditional Mohammedan lunar calendar in 1979 after removal of the Shah reign. There are some efforts to improve our currently valid Gregorian calendar. Its disadvantages are the reason why an appointed day is not always on the same week day. Besides, the month lengths are not equal and the holidays, which have relations to the feast of Easter, are moved within the calendar from one year to another. A very sophisticated suggestion was proposed by the United Nations, but the international establishment of this suggestions has failed, since it was resisted by some countries as well as the churches.