On 08-Oct-06 Adam Bower wrote:
On Sun, Oct 08, 2006 at 06:29:24PM +0100, Ted Harding wrote:
I was prompted to investigate by catching someone referring to the Julian->Gregorian transition on the radio this morning.
I've known about 'cal' since 1984, and about its respect for the transition (documented in 'man cal').
Aaaah, that explains it then, you had me worried that someone could be a Unix user for over 20 years and not know about cal!
I have a vivid memory of when I first became aware of this. The man page for 'cal' on that 1984 version of Unix (By SoftQuad as I recall) mentioned it briefly, though I can't now directly recall the exact wording.
I've just shoved aside a pile of "archival material" (don't ask ... ) and delved into dust to retrieve printed manuals for SCO Xenix from 1988 which I've been hoarding. There, 'man cal' says (final para):
The calendar produced is that for England and her colonies. Note that England switched from the Julian to the Gregorian calendar in September of 1752, at which time eleven days were excised from the year. To see the result of this try "cal 9 1752".
What I do recall from 1984 is the words 'try "cal 9 1753"' though I'm not sure about the rest of the context, since I seem to recall that they were sort of dropped in for the reader to experience the consequences, without being prepared for it. But I could be wrong about that. Anyway, I did try it, and was delighted; and that's what I do recall.
In any case, this was one of the details that impressed me about Unix (in addition to the big things). Someone had taken considerable trouble to get details right, and to think of details to get right!
The FreeBSD version of 'cal', or rather its new version 'ncal', is more sophisticated that the standard Linux version, in that it has extra options, including "-s":
Hmmmn, appears that the version of cal (and I've got ncal too) on my Ubuntu and Debian boxen are the BSD version and that the GNU version of cal is called gcal.
I don't seem to have BSD cal or ncal on my most recent Linux (Red Hat 9), nor can I find gcal under that name. However, I have some recent live CDs (Ubuntu, Slackware) and will check them sometime.
If I was really bored then I'd grab the source code for the Gnome clock and work out why it is wrong, but I think i'll leave that until another day ;)
As I recently posted, I suspect that the Gnome clock simply extrapolates the Gregorian algorithm backwards into forbidden territory. Could be wrong, of course!
Best wishes, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 08-Oct-06 Time: 20:30:31 ------------------------------ XFMail ------------------------------