Re: Hijri Calendar + searching datetime mail archives

2003-08-22 Thread Eugene van der Pijll
Matt Sisk schreef:
 At some point there was discussion of a Hijri calendar on this mailing 
 list, but I'll be darned if I can find the references.

Are you sure? I can't find any discussion (googling on e.g. islamic
perl datetime finds only one or two posts), and I can't find anything in
my 'sent' folder, and I'm almost sure I would have mailed in such a
discussion.

There was a mention of the Hejira calendar in a discussion on Business
dates; perhaps that's what you remember? Or the Jalali (Persian)
calendar is similar to the Hegira calendar, maybe that was it?

 Anyway, there's some code posted out on perlmonks pertaining to Hijri 
 calendar conversions. I have no idea of the accuracy and it doesn't 
 involve DateTime. Perhaps Alex could be persuaded to work on a DateTime 
 implementation:

It probably is accurate; but there are several (different) algorithms to
calculate Hejira dates, used by different countries, and all of these
are only approximations of the true dates, which are based on
observations of the new moon. So we should be careful when we announce a
module for _the_ DT::Cal::Hidjra.

If necessary, I'm willing to help converting it to a DateTime module;
it's not that difficult, as the Gregorian=Hijrah conversion in Alex'
module is already done via an absolute (rata-die) date.

Eugene


Re: Hijri Calendar + searching datetime mail archives

2003-08-22 Thread Matt Sisk
Eugene van der Pijll wrote:
Are you sure? I can't find any discussion (googling on e.g. islamic
perl datetime finds only one or two posts), and I can't find anything in
my 'sent' folder, and I'm almost sure I would have mailed in such a
discussion.
Hijri, Hejira, Hidjra...darn if I can figure out why I couldn't find 
squat on google! :)

I'm not overly familiar with these calendars, although I know that the 
proper ones are lunar-based. As for my memory, I'm no doubt also 
conflating the Jalali discussion into the mix.

It probably is accurate; but there are several (different) algorithms to
calculate Hejira dates, used by different countries, and all of these
are only approximations of the true dates, which are based on
observations of the new moon. So we should be careful when we announce a
module for _the_ DT::Cal::Hidjra.
Right...I had taken a quick look at his code and knew that it must be a 
simplified version since it had no lunar component.

If necessary, I'm willing to help converting it to a DateTime module;
it's not that difficult, as the Gregorian=Hijrah conversion in Alex'
module is already done via an absolute (rata-die) date.
True. His post caught my eye because he mentioned it had been ported 
from some KDE code. I wasn't sure if their algo was particularly clever 
or worth capturing in DT.

Cheers,
Matt