incubator-zeta-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerome Renard <>
Subject Re: [zeta-dev] Patch: DateTime functionality for Template
Date Mon, 31 Jan 2011 18:59:49 GMT
Hi Tobias,

On Mon, Jan 31, 2011 at 2:08 PM, Tobias Schlitt <> wrote:

> Hi,
> I had a quick chat with Derick during PHP Benelux about this patch. He
> suggested to make the DateTime objects in Template immutable. I'm pretty
> much for doing so and would actually desire to change that in PHP
> itself, if it would be possible.
> Making DateTime objects immutable would result in much more sane
> behavior of date_modify(), date_add() and friends, since they would no
> more change the original object, but return a new one which has the
> desired manipulation applied.
> We've an implementation for immutable DateTime lying around, which we
> could just move to Base/ so it's available for others easily, too. Find
> the code attached.
> What do you think?

Totally agree.

BTW your implementation of the DateTime extension looks a bit too complex.
Do we really need all these private function *add() methods ? Wouldnt'it be
possible to just avoid them
and move their contents to the public ones ? I may have overlooked something

+1 for moving the code to Base anyway.


Jérôme Renard | |

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message