« Return to Thread: [Fwd: Re: [fw-i18n] PHP DateObject]

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

by GavinZend :: Rate this Message:

Reply to Author | View in Thread

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 <gavin@...>
To: Thomas Weidner <thomas.weidner@...>
CC: fw-i18n@...
References: <002501c71321$11588190$6401a8c0@...>



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)


 « Return to Thread: [Fwd: Re: [fw-i18n] PHP DateObject]

LightInTheBox - Buy quality products at wholesale price!