emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Holidays in fancy diary


From: Glenn Morris
Subject: Re: Holidays in fancy diary
Date: Fri, 06 Feb 2004 21:46:30 +0000
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Ed Reingold wrote:

[various things]


With apologies to emacs-pretest, and those CC'd, but I feel I should
respond to these emails in the forum in which they were made. I'm the
person who made these changes, so if you want to continue shouting at
me, then you can do so direct to my inbox.

Let me explain this from my perspective.

A bug report was filed ("calendar-day-of-week reports negative date"),
about how calendar-day-of-week gave wrong answers for years BC. I
replied saying that many of the calendar functions refuse to operate
on years BC, and perhaps this one should too. RMS replied to me,
saying it might be nice to extend this one and others to years BC.

I went away and thought about this. Perhaps I am, as you say, too
stupid to understand your code, but don't accuse me of making changes
in a cavalier fashion. 

You seem to be so upset I assume there is some bigger flaw in what I
did than the original bug report that sparked this, which is of course
trivial. So perhaps my basic concept is flawed. My concept is this:

The sequence of years goes: 3 BC, 2 BC, 1 BC, 1 AD, 2 AD, ... The
Gregorian calendar operates on a 400 year cycle. Year 400 AD was a
leap year. Therefore, "0 AD", ie 1 BC would be also. The sequence of
leap years in BC years can be worked out from this basis. With this,
the function calendar-absolute-from-gregorian can be extended to
years BC, and hence the function calendar-day-of-week, and so on.

I adapted several functions along these lines, as documented in the
ChangeLog. 

I am aware that there are several functions which I have not adapted,
for example calendar-gregorian-from-absolute. These are the ones that
involve non-trivial algorithms that are only valid for years AD, and I
didn't think it worth my time to try and adapt them. So my treatment
of years BC was only partial. For this reason, I left
calendar-date-is-legal-p alone, so that the complex holiday functions
will not be applied to years BC, causing errors. But one can now
display calendars for years BC, in what I thought was a
self-consistent manner.

I thought that every change I made would leave treatment of years AD
unaffected. Clearly, I missed one (undocumented) fact, namely that
the return value of increment-calendar-month matters. Maybe there are
others. That's why there's a bug list.

If the concept I used is wrong, then you can educate me as to why. You
seem to think I have made some obvious mistake, in which case it will
take you no time at all. Certainly less than to write several emails
that consist of nothing but shouting.

If it cannot be done at all, then I can easily revert things. That's
why we have a version control system.

If the concept is right but the implementation is wrong, you can tell
me where and I'll fix it.

But whatever the case, there's no need to get upset. I made these
changes, so they reflect on me, not you. Your actions in response are
what reflect on you.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]