Phil Plait runs down the numbers about leap days, and why the Gregorian calendar has them every 4 years but skip every 100, except when we unskip every 400.
And if you find that confusing, you’re still probably not as confused as we Swedes are. The old Julian calendar didn’t have the rules about skipping (or not) years divisible by 100 or 400, so that’s why it got off track and countries started changing to the Gregorian. And while most countries just bit the bullet and dropped the 10 or 11 days (depending on when the change was made), Sweden tried to think different … and screwed it up. Miserably.
To avoid the havoc of just obliterating the large chunk of days, the Swedes decided to do it this way: just say no to leap days for 40 years, and then their calendar would be in synch with the Gregorian calendar. The problem of not lining up with either calendar didn’t dissuade them from this plan. It started out well enough — they began this in 1700, which was a leap year for the Julian but not the Gregorian calendar, so there would have been no Feb 29 with either method of adoption. But something went terribly wrong: somebody (no doubt addled by overconsumption of herring) forgot the master plan, so 1704 and 1708 both had a leap days. Rather than just go ahead with the Gregorian adoption, it was decided to go back to the Julian calendar, but an extra day would be needed, since one had been dropped in 1700. Solution? A leap day! It was added in 1712, and since 1712 was already a leap year, that meant there was a Feb. 30.
The Swedes went ahead with the Gregorian calendar in 1753, adding in the 11 days all at once.