Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17194 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20576 invoked by uid 1010); 8 Jul 2005 12:31:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 20561 invoked from network); 8 Jul 2005 12:31:36 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 8 Jul 2005 12:31:36 -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:50327] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 41/6B-59389-7227EC24 for ; Fri, 08 Jul 2005 08:31:35 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j68CVV6C017767 for ; Fri, 8 Jul 2005 14:31:31 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j68CVEaL017717; Fri, 8 Jul 2005 14:31:15 +0200 Date: Fri, 8 Jul 2005 14:31:14 +0200 (CEST) X-X-Sender: derick@localhost To: Edin Kadribasic cc: internals@lists.php.net, Pierre-Alain Joye In-Reply-To: <200507081330.46764.edink@emini.dk> Message-ID: References: <5.1.0.14.2.20050707164528.02833cc0@localhost> <20050708021723.46bb4484.pierre@dotgeek.org> <200507081330.46764.edink@emini.dk> 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] date/timezone classes From: derick@php.net (Derick Rethans) 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). Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org