Re: Request for improving 'date' command

2008-06-20 Thread Paul Eggert
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.)


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Request for improving 'date' command

2008-06-19 Thread Ghassem Tofighi
Hi
I'm a Persian Linux user. I saw in date manual that you are the
developer of date.
As you know there are some other calendars in the world that are used vastly.
In Iran and some another country we use jalali calendar, in Israel
people use jewish calendar and in Arabic country people use hijri
calendar.

I want from you to add some options to the date command that we can
use them in our commands.
for example :

date -j for jalali date
and
date -h for hijri date

I attached two basic codes for jalali and hijri calendar, and you can
use them for that purpose.
Thanks

-- 
--
Ghassem Tofighi
http://ght.ir
I'm available with my Email...Trust me !
[EMAIL PROTECTED]
Don't break Hearts, Please !
---
--


hdate.c
Description: Binary data


jdate.c
Description: Binary data
___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils