Getting started with the Year 2100 Bug
The solar year is the period of time required for one revolution of the Earth around the Sun.
This interval could be seen as a continuous sequence of 365 units of “days”, measured from sunrise to sunrise.
The 365 days were tabulated to what we now call the Solar Calendar, and it became an important cornerstone of agrarian society, providing a predictable and consistent reference consistently aligning each day to the exact tropical season, year after year.
However, the time interval of a solar year is not exactly 365 days, but rather closer to 365¼ days.
Since the calendar can only express full days, one-quarter of one day would not be represented in the yearly calendar. Over time, if this gap was not adjusted, it would eventually lead to a misalignment between seasons and calendar days. For example, Summer might commence in December and winter in July. This would be extremely disruptive to agrarian society, and a remedy was needed.
What is The Leap Year Rule?
“Experience is the Teacher Of All Things” – this saying has been attributed to Julius Caesar, who also introduced the Leap Year Rule, which was made to adjust for the yearly quarter-day gap in the Solar Calendar.
This would be achieved by adding one extra day to the solar year calendar, once every four years, to “make up” for the four quarter-days “lost” over four years. The one year out of every four years that would be designated to have the extra day added to it would be known as a Leap Year, and would be determined as such if the value of that year (for example 2022) was divisible by four, meaning the division of the year value by four would yield a remainder of zero.In that case, the leap year would have 366 days instead of 365 days. The “extra” day would be added to the shortest month – February. Therefore in a leap year the month of February will have 29 days instead of 28.
An exception to the Leap Year Rule
It turns out that the precise time interval of a solar year is not 365¼ (or 365.25) days, but rather 365 days, 5 hours, 48 minutes and 46 seconds (or 365.242 days).
In other words, each year loses a little less than one-quarter of a day, and the leap year compensation once every four years should also be a bit less than one full day.
The practical solution was to continue adding one full day every four years, and an exception to the Leap Year Rule was added:
for every period of four hundred years, three years that were divisible by four would not qualify as leap years. This exception would be tested once every one hundred years, in a centennial year such as 1900 or 2000, so that only one out of every four centennial years would become a leap year; three of those four centennial years would not.
A centennial year would be considered a leap year only if it was divisible by four hundred.
And so the Leap Year Rule was finalized as follows:
A leap year is a year whose value is divisible by 4, except when divisible by 100 but not by 400
Do legacy systems calculate the Leap Year correctly?
I asked a number of colleagues to check how their core legacy (Cobol) systems calculated the leap year. Almost all reported that their programs determined a leap year by dividing by four only.
There didn’t seem to be much awareness in the code about the centennial exception rule.
I assume this hasn’t come up as an issue because the computing age began in the mid-1900s, and the year 1900 itself most likely did not have much relevance in calculations taking place in the 20th century.
The next centennial year – the year 2000 – actually was a leap year, so even without implementing the centennial exception, the leap year designation for 2000 was effectively correct.
This leaves us with the year 2100…If you look up February 29th, 2100 on your calendar, it does not appear. That’s because while 2100 is divisible by four, it is also divisible by 100, but not by four hundred – therefore the year 2100 is not a leap year.
The Year 2100 Bug
Many core legacy systems will be computing the year 2100 incorrectly as a leap year with 366 days and February 29th as a valid date, because they do not employ the centennial exception to the Leap Year Rule.
It would be interesting to see for example how a loan application system would process a balloon loan with a payment date set for February 29th, 2100.
Assuming most systems do not implement the centennial exception, what would happen later on with a due date that does not exist?
While it can be expected that most systems will be replaced by the year 2100 arrives, future projection calculations that are performed today and in the coming decades (for interest, loans, savings and so on) could potentially reach the year 2100, and possibly have implications.
This is of course something each organization would need to explore, analyze, and decide if and how it should meet this challenge practically.
The first step could be simply scanning the relevant system sources to get a feel for the magnitude and effort that may be needed to mitigate the issue.
Feel free to contact us to see how we can help!


