News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sudheer Satyanarayana's Blog:
Zend Date Class Constants Cheat Sheet
December 28, 2010 @ 10:04:21

Sudheer Satyanarayana has provided a handy cheat sheet for those using the Zend_Date component of the Zend Framework listing the default values of the constants it provides.

Date and time handling in general is a problem in programming. For PHP programmers, there's a good library out there that performs all the difficult tasks and provides convenient APIs. Zend_Date has several constants defined. It is good to know what each one of them represents.

You can either come back to this post if you need a reference or you can download the PDF and have it right at your fingertips.

0 comments voice your opinion now!
zenddate zendframework constants cheatsheet pdf


Eran Galperin's Blog:
On the pitfalls of date validation with the Zend Framework
June 22, 2010 @ 12:58:43

On his techfounder.net blog today Eran Galperin talks about one of the issues you might currently see with the date validation in your Zend Framework application - a problem in the Zend_Validation_Date component related to its use of Zend_Locale.

Zend_Date tries to validate dates according to a given format (with a default fallback). The dangerous behavior is that it tries to convert the given format to a localized format using Zend_Locale. Zend_Locale attempts to detect automatically the locale of the requesting client, and it appears that on the machines that were exhibiting the bug, a different locale was determined than those I was testing it on.

His problem was when the method tried to parse a non-localized date format and ended up converting it based on the local machine's locale settings. To correct the issue, since he didn't really need the autodetect local feature anyway, he just manually set the locale in his bootstrap via a registry setting.

0 comments voice your opinion now!
zendframework zenddate validation locate issue


Zend Framework By Examples:
Handling dates and times (Zend_Date)
January 22, 2010 @ 11:09:45

The Zend Framework By Examples site has posted a recent tutorial about using the Zend_Date component of the Zend Framework to work with dates and times in your PHP applications.

In this example, we get or set dates in different timezones. We display parts of dates and times in various formats. We also get information on sunrise and sunset in several locations.

They also incorporate other components in the examples including Zend_Cache, Zend_Locate and Zend_Registry. Their examples show how to check the locale, verify the timezone and figure out a "date from now". Complete code is included - it's not the best method to handle some parts of the example, but it's a rough guide in the right direction.

1 comment voice your opinion now!
zenddate zendframework tutorial timezone



Community Events





Don't see your event here?
Let us know!


conference podcast threedevsandamaybe deployment introduction interview community developer tips release laravel framework application code api language list development series zendserver

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework