Re: glib time functions
- From: Ali Abdin <ALIABDIN aucegypt edu>
- To: Robert Brady <robert suse co uk>
- Cc: gtk-devel-list redhat com
- Subject: Re: glib time functions
- Date: Thu, 30 Nov 2000 13:04:12 +0300
On Thu, 30 Nov 2000, Robert Brady wrote:
> On Wed, 29 Nov 2000, Ali Abdin wrote:
>
> > Also, some years, the muslim world is "divided" on the ramadan times. By
> > definition, the Islamic calendar can never be 100% accurate, but it can be
> > damn close (as proved by the lisp algorithm that was devised).
>
> Are there a countable number of places that observations are done in? Are
> the differences at all predictable?
Each country does its own observation. If a country does not have
"Islamic scholars" to do this observation, you base it on the closest
muslim country that does (or something like that).
> What happens when it's wrong; presumably we want to correct this ASAP, so
> it should be easily replacable.
>
> /me imagines NTP servers with an extension... :)
Yes, I had though of this actually. But an NTP server will not be a
solution for "offline" applications and such.
I think that there should be an API function that allows you to take into
account ramadan time. The application should (through an NTP server)
what the ramadan is (like I said, G_RAMADAN_EARLY, G_RAMADAN_NORMAL,
G_RAMADAN_LATE).
So an app would look up ramadan time on a "custom" NTP server and say, oh
- we're early, then it would set the appropriate API function (which glib
will now use to compute the dates (it will only affect dates that come
/after/ the 9th month (i.e. it will only affect 3 months).
> > I have made one premise though (which I believe is safe to make) and that is
> > we don't determine new days based on sunset/sunrise (too difficult, not
> > essential, not used in the Islamic world anyway).
>
> That'd be very interesting, but would require glib knowing your latitude,
> longitude, altitude, whether there are mountains, and probably some other
> things.
Somebody was working on a libastro library that would actually "handle"
this - You provide the timezone I think and you can get sunset/sunrise
times.
Remember this is for /Date/ functions - I do not think time should be
taken into account, because in the Islamic world nobody bases their time
on Sunset/Sunrise (well, only for prayers). We should just use the 24 hr
scheme.
> > If people want this for glib, I can try to work up a patch (if you tell me
> > what kind of functions you want (i.e. do you want just the conversion
> > functions? Should we add other things? etc.))
>
> I'm going to do an initial patch for a few more simple calendars.
> (Gregorian, Julian, Persian, and probably some interesting proposed reform
> ones, and of course the Shire Reckoning (used by hobbits c.a. 3000 TA,
> which is an interesting one due to it having days that aren't weekdays.))
I'd do a patch too, but I got exams and finals coming up :(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]