The fact that the number of days in a year doesn't perfectly match up with the Earth's rotational cycle has posed a problem throughout history. Pope Gregory's attempt to combat some of the complications of that problem caused riots in what has to be the first time battle in history.
In 1583, Pope Gregory had a problem. Astronomers were well aware of the fact that the Earth's rotation and its orbit didn't sync up to the tune of a quarter of a day every year. That's why leap year was established. That wasn't the problem. The problem was that the orbit was not off by exactly a quarter of a day, but by "about" a quarter of a day. An Earth year falls eleven minutes short of that extra quarter of a day, and after a few hundred years, that adds up. Slowly, Easter would be pushed into summer, and that was not a holiday that allowed anyone to play around with its timing.
The Pope appointed a commission that would straighten things out, and they came up with a good solution. Three times every four hundred years, they'd skip a leap day. The years that could be evenly divided by 400 could keep their leap days, which is why none of us heard of this when we celebrated the millennium. The next skipped leap day is going to be in the year 2100.
That prevented the problem of extra days for a while. (The extra seconds will eventually add up to another day every 3,300 years, but we'll let the invading Martians worry about that.) But it wasn't a correction. They were already about ten days off, and so the Pope announced that on midnight of October fourth, Europe should go ahead and skip to October fifteenth. That solved the problem!
The people did not agree. Strongly Catholic countries were willing to follow along, but others refused. Most interestingly, a mob in Frankfort literally rioted, becoming the world's first time warriors. The war was not ended quickly. Britain didn't give up their days until the 1700s, and Russia only changed over in 1918.