It would be nice to have a proper input in your example and not a variable.
So that we can see if what you are give Zend_Date is a proper W3C date value.

Also I expect that you have set you php to produce no error output.

If your input is false you would get an exception.
And you will always get an output.

$date->get(Zend_Date::W3C);
try
print $date->get(Zend_Date::W3C);

to see what is returned...
get() always returns a string.

Greetings
Thomas
I18N Team Leader

----- Original Message ----- From: "Arthur Wiebe" <[EMAIL PROTECTED]>
To: "Zend Framework General" <[email protected]>
Sent: Thursday, March 01, 2007 9:50 PM
Subject: [fw-general] Zend_Date, Settings dates


I want to use Zend_Date for a calendar system. I need to be able to accept a
date and  use it with Zend_Date.

But the following line produces unexpected results:
$date = new Zend_Date($event['fromTime'], Zend_Date::W3C, $locale);
$date->get(Zend_Date::W3C);

But when trying to retrieve[get] the date, nothing is returned.
"fromTime" is already formatted into the W3C format.

Or maybe I'm just too tired and can't think properly. (Good chance)

May I ask what the proper way would be to set the date from user input?

Thanks
--
<Arthur/>


Reply via email to