Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11863 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82051 invoked by uid 1010); 3 Aug 2004 09:55:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82025 invoked from network); 3 Aug 2004 09:55:45 -0000 Received: from unknown (HELO jan.prima.de) (83.97.50.139) by pb1.pair.com with SMTP; 3 Aug 2004 09:55:45 -0000 Received: from BAUMBART (p508EA2D1.dip.t-dialin.net [::ffff:80.142.162.209]) (IDENT: HydraIRC, AUTH: LOGIN tobi) by jan.prima.de with esmtp; Tue, 03 Aug 2004 09:53:23 +0000 Date: Tue, 3 Aug 2004 11:55:26 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1955113307.20040803115526@marcus-boerger.de> To: John Lim CC: internals@lists.php.net In-Reply-To: <20040803093240.20818.qmail@pb1.pair.com> References: <1697824207.20040802223614@ionzoft.com> <011601c47920$8d116ba0$0a00a8c0@home.jevon.org> <20040803083420.71956.qmail@pb1.pair.com> <1912137764.20040803104457@marcus-boerger.de> <20040803093240.20818.qmail@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Date Support From: helly@php.net (Marcus Boerger) Hello John, ups you're right of course, i must be dreaming. Maybe you should talk to Derick about the internal functions and you should also have a look at pecl/date. marcus Tuesday, August 3, 2004, 11:32:38 AM, you wrote: > Hi Marcus, > For 32 bit architectures, normally: > sizeof(float) == 4, sizeof(double) == 8 or 10 sizeof(long double) == 10 > So there is no floating point overflow fortunately. > E.g. http://www.iota-six.co.uk/c/b3_float_double_and_sizeof.asp > PS: i think the date() and mktime() functions could be extended using the > algorithms described in the date library, if anyone is interested. It would > make date( ) and mktime() much more user friendly. > "Marcus Boerger" wrote in message > news:1912137764.20040803104457@marcus-boerger.de... >> Hello John, >> >> how does that help? I mean sizeof(double) == 4 == sizeof(int/32). >> In other words the bitsize is the same. Only you get an exponent. >> The result is that you loose time information accuracy. >> >> regards >> marcus >> >> Tuesday, August 3, 2004, 10:34:18 AM, you wrote: >> >> > Hi >> >> > There's a library that i wrote that supports timestamps > 2037. >> >> > It takes advantage of the fact that PHP converts integers to floats on >> > overflow. It uses the nearly the same api as date() and mktime(), to > make >> > porting easier. >> >> > Regards, John >> >> > See http://phplens.com/phpeverywhere/adodb_date_library >> >> > "Jevon Wright" wrote in message >> > news:011601c47920$8d116ba0$0a00a8c0@home.jevon.org... >> >> I always wished that PHP had VB's set of operators on dates/times... > (and >> >> also in SQL): year(), month(), date(), time_serial(), and the like. > Yes, >> > you >> >> can do it with date("...", $x); but then it's just awkward to remember > all >> >> the operators. >> >> >> >> Also, I'd always wished that PHP would have support for dates after 32 > bit >> >> (2037)... when do you think Pecl's Date would get into PHP? >> >> >> >> Jevon >> >> >> >> ----- Original Message ----- >> >> From: "Jason Garber" >> >> To: >> >> Sent: Tuesday, August 03, 2004 2:36 PM >> >> Subject: [PHP-DEV] Date Support >> >> >> >> >> >> > Hello internals, >> >> > >> >> > Not to take away from the wonderful and lively "GOTO" discussion, >> >> > but... I've got a couple simple questions. >> >> > >> >> > 1. Is there a particular reason that PHP does not have a really > good >> >> > set of functions for dealing with true date and time types (i.e. > not >> >> > timestamps)? >> >> > >> >> > 2. I think that good date and time handling in PHP would be a >> >> > large plus. MySQL provides, imho, a very effective set of tools > for >> >> > handling dates. I think that this style of date handling, where > the >> >> > standard format was YYYY-MM-DD HH:MM:SS would be an ideal way to > go. >> >> > Comments? >> >> > >> >> > 3. If there is no good reason for not adding this set of functions >> >> > to the PHP core, what would be the method of designing an > acceptable >> >> > set of functions? >> >> > >> >> > PHP is a feature packed language, but it's strange that this does > not >> >> > exist in the core. Thanks for your time. >> >> > >> >> > -- >> >> > Best regards, >> >> > Jason Garber mailto:jason@ionzoft.com >> >> > IonZoft, Inc. >> >> > >> >> > -- >> >> > PHP Internals - PHP Runtime Development Mailing List >> >> > To unsubscribe, visit: http://www.php.net/unsub.php >> >> > >> >> > >> >> >> >> >> >> >> -- >> Best regards, >> Marcus mailto:helly@php.net -- Best regards, Marcus mailto:helly@php.net