title: PHP / Zend custom date input formats
body: <p>I'm creating a library component for other developers on my team using PHP and Zend.  This component needs to be able to take as input a date (string) and another string telling it the format of that date.  Looking through the Zend documentation and examples, I thought I found the solution -</p>
  
  <pre><code>$dateObject = Zend_Date('13.04.2006', array('date_format' =&gt; 'dd.MM.yyyy'));
  </code></pre>
  
  <p>this line, however, throws an error - call to undefined function.</p>
  
  <p>So instead I tried this -</p>
  
  <pre><code>$dt = Zend_Locale_Format::getDate('13.04.2006', array('date_format' =&gt; 'dd.MM.yyyy'));
  </code></pre>
  
  <p>This gets the job done, but throws an error if a date that is entered isn't valid.  The docs make it look like you can use the isDate() function to check validity -</p>
  
  <pre><code>Zend_Date::isDate('13.04.2006', array('date_format' =&gt; 'dd.MM.yyyy'))
  </code></pre>
  
  <p>but this line always returns false.</p>
  
  <p>So my questions -</p>
  
  <p>Am I going about this the right way?  If not, is there a better way to handle this via Zend or straight PHP?</p>
  
  <p>If I do use Zend_Locale_Format::getDate(), do I need to worry about a locale being set elsewhere and changing the results of the call?</p>
  
  <p>I'm locked into PHP 5.2.6 on windows, btw... so 5.3+ functions &amp; strptime() are out.</p>