type DAY is range 1..31; type MONTH is (JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC); type YEAR is range 0..2000; type DATE is record D: DAY; M: MONTH; Y: YEAR; end record; TODAY: DATE;
Worst Y2K example ever
I just ran across the above example in Peter Wegner's "Programming with ADA: An Introduction by Means of Graduated Examples", published in 1980. This one didn't even have the excuse that it was storing two-digit years!