Who invented the calendar?

During the Stone Age, humans observed how the equinoxes (21 March and 22 September) repeated year after year. Later, many races oriented themselves to the lunar year. After twelve full moons – 354 days—the year was complete and hence the lunar calendar was eleven days short of the solar calendar. The first solar calendar was created by the Egyptians. Although the start of the year did not get displaced by eleven days as in the lunar calendar, it got displaced by about a month every 120 years. To balance this anomaly, Julius Caesar introduced a leap year after every four years. This calendar was improved by Pope Gregory XIII in 1582.