Re: [HC Evolution] Introduction



Thanks for those URLs. I'll digest the information soon. The way that Emacs
does Islamic calendar support is weird. It is an approximation at best. And
a strange approximation. I saw one Islamic Lunar Calendar site that
basically what Emacs does, does not make sense. Emacs code is also an
approximation. Like I said - you can never code a 100% accurate Islamic
Calendar because an Islamic Scholar might just change it on you becuase the
moon was not sighted :) (luckily it can only shift two days per year).

The way emacs does it is classify the months as 'leap months' and 'non-leap
months'. Even though there is no such thing in the Islamic calendar. It
then sets the number of days or each of these months or something like
that. I don't recall the exact code, and i don't have Linux (and won't
until some gracious person can send me one). I do not believe that emacs is
the right way to go, because it makes the assumption that its Islamic
Calendar is non-changing, but it does change.

Again, I will read the URLS provided :) (I mail'd this before reading the
URLs). I do not have the calendar-book and I doubt i will find it at my
Uni's library. Naturally if somebody wishes to donate the book for me to
explore i don't mind. Otherwise i will use the postscript files JWZ
provided :)


Ali Abdin wrote:

It would be very hard (impossible) to design a GUI over two functions
(time_t -> native and native->time_t) so you would need some sort of
(xml?)
file that defines the months, the number of days in months, the number
of
months, etc etc. But Russel Steinthal convinced me this is not really
necessary :)

Perhaps you guys are all over this, but anyone who is thinking about
supporting non-Gregorian calendars should have completely absorbed
everything that Ed Reingold has written on the subject.  A web site
about his book is here:
http://emr.cs.uiuc.edu/home/reingold/calendar-book/

A predecessor to that book is online, and is incredibly informative:
http://emr.cs.uiuc.edu/~reingold/calendar.ps
http://emr.cs.uiuc.edu/~reingold/calendar2.ps
http://emr.cs.uiuc.edu/~reingold/calendars.shtml

He wrote the Emacs calendar package, and it supports lots and lots of
different calendars in a sane way.  And -- bonus points -- it's already
GPLed, so you can cut and paste to your heart's content.  (I imagine it
would be trivial to port it to another language; he's done it several
times, including Java, but seems to have licensed these other ports
under a "non-commercial use only" license.)

--
Jamie Zawinski
jwz jwz org             http://www.jwz.org/
jwz dnalounge com       http://www.dnalounge.com/






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