Postscript Calendar Program
David Evans
dre at cs.nott.ac.uk
Thu Sep 21 00:38:02 AEST 1989
I had a quick look through the PostScript code and noticed that the leap year
calculation is wrong - despite being fixed! Centuries are leap years only
if divisible by 400, not 1000! The "isleap" procedure should be changed to
the following:
/isleap { % is this a leap year?
year 4 mod 0 eq % multiple of 4
year 100 mod 0 ne % not century
year 400 mod 0 eq or and % unless its a century divisible by 400
} def
+-----------------------------------------------------------------------------+
| David R Evans, JANET: dre at cs.nott.ac.uk |
| Electronic Publishing Research Group, ARPA: dre%nott.cs at cs.ucl.ac.uk |
| Department of Computer Science, UUCP: ... !mcvax!ukc!nott-cs!dre |
| University of Nottingham, Tel. NOTTINGHAM(0602) 484848 |
| NOTTINGHAM, ENGLAND, NG7 2RD. Ext. 2765 |
+-----------------------------------------------------------------------------+
More information about the Alt.sources
mailing list