Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17195 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22569 invoked by uid 1010); 8 Jul 2005 12:36:11 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 22554 invoked from network); 8 Jul 2005 12:36:10 -0000 Received: from unknown (HELO dotgeek.org) (127.0.0.1) by localhost with SMTP; 8 Jul 2005 12:36:10 -0000 X-Host-Fingerprint: 66.194.40.80 66-194-40-80.dimenoc.com Linux 2.4/2.6 Received: from ([66.194.40.80:41808] helo=mail.dotgeek.org) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 7A/9B-59389-A337EC24 for ; Fri, 08 Jul 2005 08:36:10 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by mail.dotgeek.org (mail server) with SMTP id 83C92913784; Fri, 8 Jul 2005 13:23:34 +0200 (CEST) Date: Fri, 8 Jul 2005 14:36:34 +0200 To: Derick Rethans Cc: edink@emini.dk, internals@lists.php.net Message-ID: <20050708143634.54ad54b5.pierre@dotgeek.org> In-Reply-To: References: <5.1.0.14.2.20050707164528.02833cc0@localhost> <20050708021723.46bb4484.pierre@dotgeek.org> <200507081330.46764.edink@emini.dk> X-Mailer: Sylpheed version 2.0.0beta1 (GTK+ 2.4.14; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] date/timezone classes From: pierre@dotgeek.org (Pierre-Alain Joye) On Fri, 8 Jul 2005 14:31:14 +0200 (CEST) Derick Rethans wrote: > On Fri, 8 Jul 2005, Edin Kadribasic wrote: > > > I would love to be able to do something like this: > > > > $d = new Date(time()); > > $d->month++; > > $d->print("Y-m-d"); // date() equiv. > > Adding methods is no problem, that's what you get for free > anyway, I just think that $d->month is too much magic, and not > reproducable in non OO. (Also, passing a timestamp with time() is > not always working, because of windows' limitations with it, > that's the reason why I made it a string, or empty in case you > want to use current time). for the current time, it's fine. For example getting the next monday is pretty easy using this way. Properties are not magic. Thier behiavors have to be well documented. And how they work discussed. I talked a bit with Derick on IRC. I will take some times to finalize the specifications and put them online. We can then have a document to talk about. Not like I like to talk endlessly but there is issues we have to agree on before any implementation. Expect it over the weekend. Regards, --Pierre