Re: date/timezone classes
| From: | Andi Gutmans | Date: | Fri, 08 Jul 2005 17:59:10 +0000 |
| Subject: | Re: date/timezone classes | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17196@lists.php.net to get a copy of this message | ||
At 02:36 PM 7/8/2005 +0200, Pierre-Alain Joye wrote:
On Fri, 8 Jul 2005 14:31:14 +0200 (CEST) Derick Rethans <derick@php.net> wrote: On Fri, 8 Jul 2005, Edin Kadribasic wrote:Great. I definitely think you two should work together on this one. AndiI 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.