Validating dates
I discovered recently that Zend Framework 1's Zend_Date has two operating modes when it comes to format specifiers: iso and php, where iso is the default. When using Zend_Validate_Date in forms, I like to use the php format specifiers as they are what I'm used to and so can easily know what they mean when reviewing code that I wrote months ago. My code looks something like this: $subForm->addElement('text', 'start_date', array( 'filters' => array('StringTrim', 'StripTags'),… continue reading.


