The leap year problem
Arie van Deursen · Data Archiving and Networked Services (DANS) · 1998
A significant number of programs incorrectly treats the year 2000 as a non-leap year. We list 21 real life code fragments illustrating the large variety of ways that are used to determine whether a given year is a leap year or not. Some of these fragments are correct; others will fail in the year 2000. The fragments are written in C, Pascal, COBOL, and assembly language. We discuss the consequences for automated tool support, as well as the organizational implications of the leap year problem. 1991 Computing Reviews Classification System: D.2.2, D.2.3, D.2.7., D.3.4, F.3.1, I.2.2. Keywords and Phrases: Software maintenance, program understanding, plan-based concept recovery, COBOL, Year 2000 Problem. Note: An earlier version appeared in Dat is dus heel interessant; Liber Amicorum Paul Klint 25 jaar CWI, pp. 61--73, November 1997, Amsterdam, CWI. Note: To appear in The Year/2000 Journal 2(4), July/August, 1998. Note: Work carried out under project SEN-1.1, Software Renovation. I...