
About 2000 years ago Julius Caesar reorganized the calendar by adding an extra day every fourth year, following the advice of the Greek astronomer Sosigenes. This was necessary because the Earth takes 365, 5 hours, 48 minutes and 46 seconds to travel around the sun. The Romans had found that, with a year being only 365 days, festivals did not keep in line with the seasons.
In 1582 Pope Gregory XIII made the system more accurate by ruling that the century years (e.g. 1700, 1800,1900 ) should not be treated as leap years unless they were divisible by 400. So there was not a 29th February in 1900 but there was one in the 2000.