Postscript Calendar Program

Carl Lowenstein cdl at mplvax.EDU
Thu Sep 21 09:08:13 AEST 1989


In article <7878 at robin.cs.nott.ac.uk> dre at 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 at mpl.ucsd.edu



More information about the Alt.sources mailing list