[Fwd: Re: [fw-i18n] PHP DateObject]

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Fwd: Re: [fw-i18n] PHP DateObject]

GavinZend
I would like to suggest an addition to our customized configuration of
PHP available within the virtual accounts.

CFLAGS="$CFLAGS -DEXPERIMENTAL_DATE_SUPPORT" ./configure .... etc.

This allows the community to experiment with the new PHP Date object.

Cheers,
Gavin


-------- Original Message --------
Subject: Re: [fw-i18n] PHP DateObject
Date: Tue, 28 Nov 2006 13:25:31 -0800
From: Gavin Vess <[hidden email]>
To: Thomas Weidner <[hidden email]>
CC: [hidden email]
References: <002501c71321$11588190$[hidden email]>



Hi Thomas,

There is a compile-time switch required to enable the new ext/date code
for PHP's new Date object.  By default, the switch is not enabled.  I've
added this bit of info to our wiki:
http://framework.zend.com/wiki/display/ZFDEV/PHP+Date+Object

The example:
|<?php
$date = new DateTime("2006-12-12");
$date->modify("+1 day");
echo $date->format("Y-m-d");
?>

works in the current snapshot of PHP 5.2, when compiled natively under
Cygwin on my laptop using these options for configure:
|

$ cat ~/bin/config.nice
#! /bin/sh
#
# Created by configure

CFLAGS='-Os -DEXPERIMENTAL_DATE_SUPPORT -march=pentium-m -pipe
-fomit-frame-pointer' \
'./configure' \
'--enable-fastcgi' \
'--enable-sqlite-utf8' \
'--with-pdo-sqlite=/usr/local/lib/' \
'--enable-soap' \
'--enable-sockets' \
'--with-jpeg-dir=/usr/lib/' \
'--with-png-dir=/usr/lib/' \
'--with-zlib-dir=/usr/lib/' \
'--with-gd' \
"$@"

I expect it works in older versions of PHP with similar
compile/configure options.

Cheers,
Gavin

Thomas Weidner wrote:

> Hy Frameworkers,
>  
> while being in heavy bug tracking and solving I tried to use the new
> date class which should be implemented in php since 5.1.0 RC1.
>  
> I wanted to look if I could use it and speedup the internals of Zend_Date.
>  
> But I was not able to get the example from the php docu running.
> http://php.net/manual/en/function.date-modify.php.
>  
> Maybe someone of you guys can give hints how to get the new class running.
> Feedback is appreciated...
>  
> Greetings
> Thomas
> (Author of Zend_Date)


Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: Re: [fw-i18n] PHP DateObject]

cyberlot
Ok adding that to the DUALRUN file, will this work with 5.1.6?

Richard Thomas - Code Monkey
Cyberlot Technologies Group Inc.
507.398.4124 - Voice


Gavin Vess wrote:

> I would like to suggest an addition to our customized configuration of
> PHP available within the virtual accounts.
>
> CFLAGS="$CFLAGS -DEXPERIMENTAL_DATE_SUPPORT" ./configure .... etc.
>
> This allows the community to experiment with the new PHP Date object.
>
> Cheers,
> Gavin
>
>
> -------- Original Message --------
> Subject:     Re: [fw-i18n] PHP DateObject
> Date:     Tue, 28 Nov 2006 13:25:31 -0800
> From:     Gavin Vess <[hidden email]>
> To:     Thomas Weidner <[hidden email]>
> CC:     [hidden email]
> References:     <002501c71321$11588190$[hidden email]>
>
>
>
> Hi Thomas,
>
> There is a compile-time switch required to enable the new ext/date code
> for PHP's new Date object.  By default, the switch is not enabled.  I've
> added this bit of info to our wiki:
> http://framework.zend.com/wiki/display/ZFDEV/PHP+Date+Object
>
> The example:
> |<?php
> $date = new DateTime("2006-12-12");
> $date->modify("+1 day");
> echo $date->format("Y-m-d");
> ?>
>
> works in the current snapshot of PHP 5.2, when compiled natively under
> Cygwin on my laptop using these options for configure:
> |
>
> $ cat ~/bin/config.nice
> #! /bin/sh
> #
> # Created by configure
>
> CFLAGS='-Os -DEXPERIMENTAL_DATE_SUPPORT -march=pentium-m -pipe
> -fomit-frame-pointer' \
> './configure' \
> '--enable-fastcgi' \
> '--enable-sqlite-utf8' \
> '--with-pdo-sqlite=/usr/local/lib/' \
> '--enable-soap' \
> '--enable-sockets' \
> '--with-jpeg-dir=/usr/lib/' \
> '--with-png-dir=/usr/lib/' \
> '--with-zlib-dir=/usr/lib/' \
> '--with-gd' \
> "$@"
>
> I expect it works in older versions of PHP with similar
> compile/configure options.
>
> Cheers,
> Gavin
>
> Thomas Weidner wrote:
>> Hy Frameworkers,
>>  
>> while being in heavy bug tracking and solving I tried to use the new
>> date class which should be implemented in php since 5.1.0 RC1.
>>  
>> I wanted to look if I could use it and speedup the internals of
>> Zend_Date.
>>  
>> But I was not able to get the example from the php docu running.
>> http://php.net/manual/en/function.date-modify.php.
>>  
>> Maybe someone of you guys can give hints how to get the new class
>> running.
>> Feedback is appreciated...
>>  
>> Greetings
>> Thomas
>> (Author of Zend_Date)
>
>
Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: Re: [fw-i18n] PHP DateObject]

GavinZend
yes, thanks!

Richard Thomas wrote:
> Ok adding that to the DUALRUN file, will this work with 5.1.6?