Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17189 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3954 invoked by uid 1010); 8 Jul 2005 07:21:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 3939 invoked from network); 8 Jul 2005 07:21:18 -0000 Received: from unknown (HELO php.net) (127.0.0.1) by localhost with SMTP; 8 Jul 2005 07:21:18 -0000 X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:46519] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id F9/C1-59389-C692EC24 for ; Fri, 08 Jul 2005 03:21:17 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j687LEad021829 for ; Fri, 8 Jul 2005 09:21:14 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j687KV8s021769; Fri, 8 Jul 2005 09:20:32 +0200 Date: Fri, 8 Jul 2005 09:20:31 +0200 (CEST) X-X-Sender: derick@localhost To: Pierre-Alain Joye cc: internals@lists.php.net In-Reply-To: <20050707233646.660dd7f5.pierre@dotgeek.org> Message-ID: References: <20050707233646.660dd7f5.pierre@dotgeek.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdi-ict.nl Subject: Re: [PHP-DEV] Re: date/timezone classes From: derick@php.net (Derick Rethans) On Thu, 7 Jul 2005, Pierre-Alain Joye wrote: > The other are only duplicated with current function. This is maybe > useless. The worst being to rely on strtotime to manipulate date, > this is maybe human readable (understandable is another > question ;), but it is slooow, and the best way to hell for non > english application. I've been thinking about this, but the other way I could come up with is by passing a complex array instead of the textual description, something like: $modi = array('month' => 1); But then does that mean: next month, month 1 (january) or "first month"... I'm open here for other solutions, I just didn't find a better one that using strtotime() equivalent modifiers here. I also think that consistency is good :) > When we talked about a common object or resource in PHP, based on > what you did not read in pecl/date, it was about real transparency > throug methods able to work with date/time values. > > I suggest to make this enhancement in pecl/date. All the base is > already here. Right, one of the reasons that I made it an object, you can easily extend it there. > This is anyway a task post 5.1, for now your implementation has to > be bullet proofed until that (thinking about timezone and some > function like week number or other sources of annoyance). Week numbers work fine? Do you see a bug? If so, send me a reproducable script. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org