Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
I haven't been following this whole discussion. However, the function names should follow the coding standards and be named something like date_sunrise(), date_sunset() (or whatever other prefix makes sense). Andi At 05:02 PM 2/6/2003 +0200, Moshe Doron wrote: Zeev Suraski [EMAIL PROTECTED] wrote in message 5.1.0.14.2.20030206161428.050f11c0@localhost">news:5.1.0.14.2.20030206161428.050f11c0@localhost... At 13:36 06/02/2003, moshe doron wrote: b. sunrise() c. sunset() Hrm, what are these functions? * {{{ proto mixed sunrise(mixed time[, double latitude][, double longitude][, double zenith,][ double gtm_offset][, int format]) Returns time of sunrise for a given day location */ /* {{{ proto mixed sunset(mixed time[, double latitude][, double longitude][, double zenith,][ double gtm_offset][, int format]) Returns time of sunset for a given day location */ i wrote those functions as infrastructures for the calendar extension for returning optionaly the 'real' date depending on the calendar native e.g, the jewish dayes are come by the night mean the day is changed on sunset. the information is is also used for other religion tasks (e.g, jewish and arabic prayer times), for astronomy studies and for travelers design. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
Andi Gutmans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I haven't been following this whole discussion. However, the function names should follow the coding standards and be named something like date_sunrise(), date_sunset() (or whatever other prefix makes sense). here is part of my replay to Leon Atkinson: Also, shouldn't sunrise() and sunset() be cal_sunrise() and cal_sunset()? well, since sunset() sunrise() have aspects more then cal_* related, i thought the right place is standard. new astronomy extension, or linking against exisint lib, 'll be overhead since i want use it on the calendar extension, that is build by default on VC. moshe --
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
At 12:47 PM 2/7/2003 +0200, moshe doron wrote: Andi Gutmans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I haven't been following this whole discussion. However, the function names should follow the coding standards and be named something like date_sunrise(), date_sunset() (or whatever other prefix makes sense). here is part of my replay to Leon Atkinson: Also, shouldn't sunrise() and sunset() be cal_sunrise() and cal_sunset()? well, since sunset() sunrise() have aspects more then cal_* related, i thought the right place is standard. new astronomy extension, or linking against exisint lib, 'll be overhead since i want use it on the calendar extension, that is build by default on VC. Even functions in standard have a prefix. Only ancient ones don't and we didn't fix them for BC reasons. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
well, what about sun_set(), sun_rise()? moshe -- Andi Gutmans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 12:47 PM 2/7/2003 +0200, moshe doron wrote: Andi Gutmans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I haven't been following this whole discussion. However, the function names should follow the coding standards and be named something like date_sunrise(), date_sunset() (or whatever other prefix makes sense). here is part of my replay to Leon Atkinson: Also, shouldn't sunrise() and sunset() be cal_sunrise() and cal_sunset()? well, since sunset() sunrise() have aspects more then cal_* related, i thought the right place is standard. new astronomy extension, or linking against exisint lib, 'll be overhead since i want use it on the calendar extension, that is build by default on VC. Even functions in standard have a prefix. Only ancient ones don't and we didn't fix them for BC reasons. Andi
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
On Fri, 7 Feb 2003 14:37:32 +0200 moshe doron [EMAIL PROTECTED] wrote: well, what about sun_set(), sun_rise()? date_sunset() (or date_sun_set ;) ) if it is defined in the date/time section or cal_sunset() if it is defined within the calendar extension. my 2cts, hth pierre -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
I don't think this is good idea. date_sunset(), date_sunrise() are better. Andrey - Original Message - From: moshe doron [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 07, 2003 2:37 PM Subject: Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions well, what about sun_set(), sun_rise()? moshe -- Andi Gutmans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 12:47 PM 2/7/2003 +0200, moshe doron wrote: Andi Gutmans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I haven't been following this whole discussion. However, the function names should follow the coding standards and be named something like date_sunrise(), date_sunset() (or whatever other prefix makes sense). here is part of my replay to Leon Atkinson: Also, shouldn't sunrise() and sunset() be cal_sunrise() and cal_sunset()? well, since sunset() sunrise() have aspects more then cal_* related, i thought the right place is standard. new astronomy extension, or linking against exisint lib, 'll be overhead since i want use it on the calendar extension, that is build by default on VC. Even functions in standard have a prefix. Only ancient ones don't and we didn't fix them for BC reasons. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
+1 for date_sunset and date_sunrise. -- Regards. M.CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com Hébergement de sites internets. Andrey Hristov [EMAIL PROTECTED] a écrit dans le message de news: 016f01c2cea6$ccc6f880$[EMAIL PROTECTED] I don't think this is good idea. date_sunset(), date_sunrise() are better. Andrey - Original Message - From: moshe doron [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 07, 2003 2:37 PM Subject: Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions well, what about sun_set(), sun_rise()? moshe -- Andi Gutmans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 12:47 PM 2/7/2003 +0200, moshe doron wrote: Andi Gutmans [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I haven't been following this whole discussion. However, the function names should follow the coding standards and be named something like date_sunrise(), date_sunset() (or whatever other prefix makes sense). here is part of my replay to Leon Atkinson: Also, shouldn't sunrise() and sunset() be cal_sunrise() and cal_sunset()? well, since sunset() sunrise() have aspects more then cal_* related, i thought the right place is standard. new astronomy extension, or linking against exisint lib, 'll be overhead since i want use it on the calendar extension, that is build by default on VC. Even functions in standard have a prefix. Only ancient ones don't and we didn't fix them for BC reasons. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
At 02:37 PM 2/7/2003 +0200, moshe doron wrote: well, what about sun_set(), sun_rise()? I hope you're kidding. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
On Fri, 07 Feb 2003 14:48:50 +0200 Andi Gutmans [EMAIL PROTECTED] wrote: At 02:37 PM 2/7/2003 +0200, moshe doron wrote: well, what about sun_set(), sun_rise()? me too :) We are not going to have the whole sun extension (which is what this naming convention suggests) :) If ever these two functions would get implemented (which I think is a good idea to have such algorithm) then they would be something like date_sunrise() and date_sunset(). Much more logic, no? +1 for date_sunrise() and date_sunset() -- Maxim Maletsky [EMAIL PROTECTED] I hope you're kidding. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
At 13:36 06/02/2003, moshe doron wrote: b. sunrise() c. sunset() Hrm, what are these functions? Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
Zeev Suraski [EMAIL PROTECTED] wrote in message 5.1.0.14.2.20030206161428.050f11c0@localhost">news:5.1.0.14.2.20030206161428.050f11c0@localhost... At 13:36 06/02/2003, moshe doron wrote: b. sunrise() c. sunset() Hrm, what are these functions? * {{{ proto mixed sunrise(mixed time[, double latitude][, double longitude][, double zenith,][ double gtm_offset][, int format]) Returns time of sunrise for a given day location */ /* {{{ proto mixed sunset(mixed time[, double latitude][, double longitude][, double zenith,][ double gtm_offset][, int format]) Returns time of sunset for a given day location */ i wrote those functions as infrastructures for the calendar extension for returning optionaly the 'real' date depending on the calendar native e.g, the jewish dayes are come by the night mean the day is changed on sunset. the information is is also used for other religion tasks (e.g, jewish and arabic prayer times), for astronomy studies and for travelers design.
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
- Original Message - From: Moshe Doron [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 06, 2003 5:02 PM Subject: Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions Zeev Suraski [EMAIL PROTECTED] wrote in message 5.1.0.14.2.20030206161428.050f11c0@localhost">news:5.1.0.14.2.20030206161428.050f11c0@localhost... At 13:36 06/02/2003, moshe doron wrote: b. sunrise() c. sunset() Hrm, what are these functions? * {{{ proto mixed sunrise(mixed time[, double latitude][, double longitude][, double zenith,][ double gtm_offset][, int format]) Returns time of sunrise for a given day location */ shouldn't be gtm_offset - gmt_offset Andrey -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
shouldn't be gtm_offset - gmt_offset yep, my mistake. moshe. -- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
and `double' should be called `float' for ptoto purposes. -- Maxim Maletsky [EMAIL PROTECTED] Andrey Hristov [EMAIL PROTECTED] wrote... : - Original Message - From: Moshe Doron [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 06, 2003 5:02 PM Subject: Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions Zeev Suraski [EMAIL PROTECTED] wrote in message 5.1.0.14.2.20030206161428.050f11c0@localhost">news:5.1.0.14.2.20030206161428.050f11c0@localhost... At 13:36 06/02/2003, moshe doron wrote: b. sunrise() c. sunset() Hrm, what are these functions? * {{{ proto mixed sunrise(mixed time[, double latitude][, double longitude][, double zenith,][ double gtm_offset][, int format]) Returns time of sunrise for a given day location */ shouldn't be gtm_offset - gmt_offset Andrey -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
In a similar itch-scratching moment I whipped up a trivial PHP module that groks tzfile timezone files to give you the offset from GMT at any time in the Unix epoch. I needed this to preflight a bunch of data which had been gathered with a lot of disparate time zones into a single UTC version, but I thought it might merit further dissemination. Anyone interested? Best Wishes David Gillies San Jose Costa Rica sunrise() - sunset() functions __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
From: David Gillies [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 06, 2003 11:18 AM In a similar itch-scratching moment I whipped up a trivial PHP module that groks tzfile timezone files to give you the offset from GMT at any time in the Unix epoch. I needed this to preflight a bunch of data which had been gathered with a lot of disparate time zones into a single UTC version, but I thought it might merit further dissemination. Anyone interested? Yes. Well, at least I am. -dave -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
On February 6, 2003 11:17 am, David Gillies wrote: In a similar itch-scratching moment I whipped up a trivial PHP module that groks tzfile timezone files to give you the offset from GMT at any time in the Unix epoch. I needed this to preflight a bunch of data which had been gathered with a lot of disparate time zones into a single UTC version, but I thought it might merit further dissemination. Anyone interested? Certainly interesting functionality, however I think it would be better suited as a PECL extension or a PEAR class rather then being part of PHP's core. Ilia -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
David Gillies [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In a similar itch-scratching moment I whipped up a trivial PHP module that groks tzfile timezone files to give you the offset from GMT at any time in the Unix epoch. I needed this to preflight a bunch of data which had been gathered with a lot of disparate time zones into a single UTC version, but I thought it might merit further dissemination. Anyone interested? if i grasp u, my new 'idate(Z)' 'll do the job for u. moshe --
Re: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions
I would be very interested. And not just for PHP, tho I would like to see a PHP function for it. We have several apps that are currently obtaining the GMT offset the old-fashion way. 1. Set the TZ=GMT, perform a mktime call. 2. Set TZ to local timezone, perform the same mktime call. 3. Subtract the 2 timestamps. 4. Reset TZ back to its standard value. If you properly set the dst param, the result will be the time difference between the two timezones for whatever date/time you want. As ugly as this seems (and I do agree its ugly), it actually works very well, stable, and performs pretty fast. Our apps perform this sequence tens of thousands times per day at least. I always felt if I had the time I'd try and re-write it to do something along the same you describe, but never got there. Brian David Gillies wrote: In a similar itch-scratching moment I whipped up a trivial PHP module that groks tzfile timezone files to give you the offset from GMT at any time in the Unix epoch. I needed this to preflight a bunch of data which had been gathered with a lot of disparate time zones into a single UTC version, but I thought it might merit further dissemination. Anyone interested? Best Wishes David Gillies San Jose Costa Rica sunrise() - sunset() functions __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php