I guess the code is assuming that the user isn't over 120 years old.

Will there be a Y2.1K bug?

Ray

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of David Crayford
Sent: 27 April 2020 10:01
To: [email protected]
Subject: Re: Friday OT, cheerful program for gloomy times

FYI, you have a bug with your leap year calculation. You need to check 
if the year is evenly dividable by 100 (which are not leap years unless 
evenly divisible by 400).

isleap: procedure
   arg year .
   return (year // 4 = 0 & year // 100 /= 0 ) | year // 400 = 0


-- 
This e-mail message has been scanned and cleared by Google Message Security 
and the UNICOM Global security systems. This message is for the named 
person's use only. If you receive this message in error, please delete it 
and notify the sender. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to