bug-coreutils
[Top][All Lists]
Advanced

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

Re: Request for improving 'date' command


From: Paul Eggert
Subject: Re: Request for improving 'date' command
Date: Fri, 20 Jun 2008 12:03:40 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Thanks for those contributions, but my understanding is that the
Persian calendar is astronomical, which means any numeric calculation
would be an approximation, right?  What approximation is being used
here?  Does the code work for dates arbitrarily in the past or future,
when time_t is 64 bits for example?  (I suspect the answer is "no".)
That sort of thing.

For more on this subject, please see Reingold & Dershowitz's excellent
book "Calendrical Calculations", 3rd
ed. <http://emr.cs.iit.edu/home/reingold/calendar-book/third-edition/>.
It mentions multiple ways to approximate the Persian calendar, among
other things.

I suspect that modifying "date" to support the Persian calendar (much
less Hebrew, Hindu, Islamic, etc.) would be nontrivial, and would be
best done in a library that could be used by many programs, not just
"date".  You might want to look at Emacs's calendar code for ideas for
such a project, as the Emacs code was written by Reingold a while back
and is high quality.  (It's in Lisp, though.)




reply via email to

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