ZF-6374: Zend_Validate_Date don't make use of the application-wide locale

Issue Type: Improvement Created: 2009-04-22T06:52:23.000+0000 Last Updated: 2009-06-30T12:42:13.000+0000 Status: Resolved Fix version(s): - 1.9.0 (31/Jul/09)

Reporter: Thorsten Ruf (saphir2k) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: Attachments:


Application - Wide Locale is ignored within the Zend_Validate_Date class.

The first IF - condition is the problem. It uses only Zend_Date::isValid (which use the application wide locale if no locale is set as parameter) if a locale is in the Validation object set. Otherwise it uses hard coded validation rules which make absolutely no sense in multilanguage applications.

<pre class="highlight">
if (($this->_format !== null) or ($this->_locale !== null)) {
            require_once 'Zend/Date.php';
            if (!Zend_Date::isDate($value, $this->_format, $this->_locale)) {
                if ($this->_checkFormat($value) === false) {
                } else {
                return false;


don't make use of the application-wide locale


Posted by Dolf Schimmel (Freeaqingme) (freak) on 2009-04-22T06:55:20.000+0000


Posted by Thomas Weidner (thomas) on 2009-06-28T12:26:37.000+0000

Under code review since 28.06.2009 (r16343)

Posted by Thomas Weidner (thomas) on 2009-06-30T12:42:13.000+0000

New feature implemented with r16377

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.