Why does "cal 9 1752" produce incorrect results?

Kevin STOCK - MIS Compta kstock at gouldfr.encore.fr
Fri Nov 30 19:22:10 AEST 1990


Subject: Re: Why does "cal 9 1752" produce incorrect results?
Newsgroups: comp.unix.questions
Summary: public domain version
References: <1990Nov27.170041.28341 at watdragon.waterloo.edu> <5 at esacs.UUCP>

In article <5 at esacs.UUCP>, nick at esacs.UUCP (Nikolaos Tsivranidis) writes:
> 
> 	Forget why 'cal 9 1752' doesn't work. Who was the
> brilliant (wo)man who wrote this program? Simply amazing!
> 
> 					- nick -

Several years back, someone posting a PD version (I think it was called
"calend") which attempted to do the same thing. Unfortunately, it only
checked whether the year was 1752 to decide whether to remove the days.
Since it was based on a count of the number of days each month needed,
1752 ended up looking like this:

				1752

	 Jan			Feb		       Mar
 S  M Tu  W Th  F  S    S  M Tu  W Th  F  S    S  M Tu  W Th  F  S
	  1  2 14 15                      1    1  2 14 15 16 17 18
16 17 18 19 20 21 22    2 14 15 16 17 18 19   19 20 21 22 23 24 25
23 24 25 26 27 28 29   20 21 22 23 24 25 26   26 27 28 29 30 31 32
30 31 32 33 34 35 36   27 28 29 30 31 32 33   33 34 35 36 37 38 39
37 38 39 40 41 42      34 35 36 37 38 39 40   40 41 42

etc. Presumably the author thought that people would only check September,
not the whole of the year!

It's odd - I don't seem to have the source any more ...

  ,---------------.
,-+-------------. |    Kevin Stock
| | E N C O R E | |
| `-------------+-'    kstock at gouldfr.encore.fr
`---------------'      kstock at gouldfr.UUCP



More information about the Comp.unix.questions mailing list