The Earth rotates on itself (
revolution), while it describes an ellipse around the sun (
orbit). The day is the period of revolution. The year is the time taken to traverse the orbit (
tropical year).
The concept of month does not match any astral situation, in particular it is not related to the moon.
Dividing the year into 12 months, and fixing their lengths, are arbitrary choice originating from other preceding calendar systems.
The tropical year does not count a whole number of days. To complete its circuit around the Sun, it takes approximately to the Earth
The Gregorian calendar rounds this number up to
Therefore the Gregorian calendar is one day late on the tropical year, every 3300 years.
To achieve an average of 365 ^{97}/_{400} days a year, the Gregorian calendar adopts the following rule:
 The common year is 365 days.
 97 years out of 400 have 366 days (leap years).

A year is leap if:

it is divisible by 4 but not by 100,

or divisible by 400.
Proposed by Aloysius Lilius, a physicist from Naples, to correct the errors of the Julian calendar, he Gregorian calendar was adopted by Pope Gregory XIII en February 1582.
In adopting the Gregorian calendar, the backlog (10 days) has been caught up intermittently. Not all the countries made the transition at the same time.
Rome began, on Pope's decision, October 4th, 1582, whose following day became October 15th. In France, in 1582, December 9th was followed by December 20th.

