Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!ucsd!sdcc6!mplvax!cdl From: cdl@mplvax.EDU (Carl Lowenstein) Newsgroups: alt.sources Subject: Re: Postscript Calendar Program Keywords: leap year Message-ID: <1011@mplvax.EDU> Date: 20 Sep 89 23:08:13 GMT References: <1979@diamond.warwick.ac.uk> <7878@robin.cs.nott.ac.uk> Reply-To: cdl@mplvax.ucsd.edu.UUCP (Carl Lowenstein) Organization: U.C. San Diego, Marine Physical Laboratory Lines: 22 In article <7878@robin.cs.nott.ac.uk> dre@cs.nott.ac.uk (David Evans) writes: >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 . . . So also should the "startday" procedure similarly be changed to: off 400 idiv add % Gregorian correction This makes the calendar repeat every 400 years, as it really does. Of course, you won't notice this until the year 2400. For us people who use inch-size paper, there are various x-translation constants that should be somewhat smaller, like 190 instead of 200 picas. Really these should be paramaterized, but this is left as an exercise for the student. -- carl lowenstein marine physical lab u.c. san diego {decvax|ucbvax} !ucsd!mplvax!cdl cdl@mpl.ucsd.edu