Leap Year, Y2K, and Other Computer Calendar Issues

Every four years, we get a February 29th. What’s the story behind that? And how long has this been going on?

Leap year calendar

The Earth takes a bit over 365 days to orbit the sun completely – roughly 365-1/4 days. The calendar needs to adjust for that or the seasons get out of sync with the calendar.

Western Calendar History

Archaic Calendars

The Julian calendar was introduced by Julius Caesar in 46 B.C. to replace the Roman calendar after Julius had a team of calendar experts come up with the most accurate calendar possible at the time. The Julian calendar has added an extra day at the end of February every fourth year since A.D. 8.

The Roman calendar began during the month of the spring equinox, which always takes place in March. March 1 was the first day of the new year. The original Roman calendar had 10 months, each with 30 or 31 days for a total of 304 days on the calendar. The dates between December 31 and March 1 simply didn’t belong to any months.

According to tradition, Numa Pompilius, the second king of Rome, added two months, January and February, to fill the unnamed gap between December and March. These months were tacked on to the end of the year, and the tradition of a new year beginning near the spring equinox continued

The Julian calendar officially made January 1 the first day of the new year when it went into use in 45 B.C. The Julian calendar would remain in use into the 18th Century in some parts of Europe.

As Christianity became more widespread in medieval Europe, the pagan debauchery associated with the New Year celebration just wouldn’t do, and in A.D. 567, the second Council of Tours declared that January 1 would no longer be the first day of the year – without providing a replacment date. In A. D 755, the third Council of Tours said that the new year should begin on Easter – which itself can occur anywhere from March 22 through April 25 on the Gregorian calendar (using the Julian calendar, the earliest date for Easter in modern times would be April 3, 1763, and the latest was May 8, 1983).

Depending on where and when dates were recorded, the new year might begin on March 1, January 1, March 25, December 25, or the Saturday between Good Friday and Easter Sunday.

A History of Leap Year

Egypt first used a lunar calendar with an average of 354 days per year over 5,000 years ago. This quickly went out of sync with the seasons, so a 360 day civic calendar was created with 36 weeks of 10 days and three seasons of 12 weeks. Again, the seasons and calendar got out of step, but only one-third as quickly as with the lunar calendar.

Rather than revise its 360 day calendar, Egypt created a 365 day calendar with a 5-day month at the end of the year. This did not include a leap year, but it was the most accurate yet.

In 238 BC, Ptolomy III introduced the Ptolemaic calendar with a leap year every four years. This was where Julius Caesar got the idea to add an extra day to the Roman calendar every fourth year – and it was only after the Roman emperor Augustus introduced the Roman calendar to Egypt that the change-resistant Egyptians finally adopted Ptolomy’s idea.

The Gregorian Calendar

By the 16th Century, the fact that the year isn’t quite 365.25 years had moved the calendar and the seasons apart by 10 days. The Gregorian calendar took into account that the year is actually 365.2425 days long by doing the following:

  1. When the Gregorian calendar was first adopted in 1852, the date on the calendar jumped forward 10 days to correct the accumulated error in the Julian calendar. (When the Julian calendar went into effect, it added 80 days to create a single 445 day year
  2. Leap year was dropped in every year that is a multiple of 100, such as 1900.
  3. However, leap year was not dropped if that year is also a multiple of 400, as was the year 2000.
  4. And for good measure, the January 1 would henceforth be the first day of the year (again).

The Gregorian calendar is as good as could be devised in the 16th Century. It only varies from the solar year by 23 seconds, which means the difference takes over 3,200 years to add up to a single day.

The biggest problem with the Gregorian calendar had nothing at all to do with the calendar. The problem was the Reformation, which made some nations skeptical if not downright opposed to anything coming from the Roman Catholic Church. It took the Calendar Reform Act of 1750 to get the United Kingdom and its dominions to move from March 25 as the start of the year and drop the Julian calendar in favor of the Gregorian.

It’s very important for historians and genealogists to know when a particular state or nation changed January 1 as the first day of the year.

Calendars and Computers

Early home computers didn’t have clock chips. If they even supported a date-time stamp, the user had to enter the date and time when starting up the computer. Few of those home computers made it into the 21st Century, so the fact that some didn’t properly support 4-digit years never became a big deal, especially in the 8-bit world.

The Y2K Problem

Problem is, the original IBM PC, introduced in 1981. was designed to run an extension of the 8-bit CP/M operating system, and its designers stuck with two digits when storing the year. This is the genesis of the infamous Y2K problem that was expected to cause all kinds of catastrophes as the calendar advanced to January 1, 2000.

Planes would crash. Elevators would stop working. Pacemakers would quit. Water would no longer come out of the faucet. And ATMs would be unable to dispense cash, so you’d better stock up in advance. Seriously, these were some of the Y2K expectations.

Fortunately Microsoft delivered Windows Me and most PC makers had Y2K-ready hardware in the months leading up to January 1, 2000. It was a great time to be selling PCs and Windows upgrades.

There was a secondary Y2K problem: Programmers who didn’t use 4-digit years or who didn’t understand the Gregorian calendar made 2000 a leap year.

No Y2K Problem Here

Unix, a nulti-user operating system that goes back to 1970, never had a Y2K problem. It counts time in seconds since the start of January 1, 1970 – and the oldest Unix implementations won’t have any problem until January 19, 2038. That’s when the signed 32-bit integer that handles the timestamp overflows. The Unix world has about 22 years to figure things out, and with most CPUs running at 64 bits nowadays, it’s not an insurmountable problem for newer hardware.

Even the oldest Macs have no Y2K problem. The original 1984 Macintosh can handle dates into 2040, although the Classic Mac OS won’t allow users to set dates beyond December 31, 2019. On top of that, it can’t run System 6 or 7, so it may not even be able to set recent dates. Anyhow, 2019 is not far off – but then, how many 680×0 Macs remain in use? Apple tested Mac OS version 7.5.5, 7.6.1, 8.1, 8.5, 8.5.1, and 8.6 in advance of January 1, 2000 and declares them fully compliant with Y2K.

Maybe in the next three years, someone will patch System 6 through Mac OS 9 for this. Maybe not. All 680×0 processors are 32-bit CPUs, so a 64-bit timestamp probably isn’t a solution. While they’re at it, fixing the outdated Daylight Saving Time changeover dates would also be nice. There’s no way to fix that on these ancient Macs.

Every PowerPC Mac can handle dates to A.D. 29,940, although I don’t know if the Classic Mac OS allows setting dates beyond 2019 on PowerPC Macs. My Power Mac G5 Dual (from late 2005) still has a few years left in it. (Early versions of OS X also have a DST bug. Then again, how many people still use OS X 10.3 and earlier?)

Apple’s DOS cards for Macs fully support dates through 2099.

Further Reading

Keywords: #leapyear #calendar #gregoriancallendar #y2k

Short link:

searchword: leapyear