/** * Returns $value if it is a valid date, FALSE otherwise. The * date is required to be in ISO 8601 format. * * @param mixed $key * @return mixed */ public function testDate($key) { if (!$this->keyExists($key)) { return false; } if (Zend_Filter::isDate($this->_source[$key])) { return $this->_source[$key]; } return FALSE; }
/** * Returns $value if it is a valid date, FALSE otherwise. The * date is required to be in ISO 8601 format. * * @param mixed $key * @return mixed */ public function testDate($key) { if (Zend_Filter::isDate($this->_source[$key])) { return $this->_source[$key]; } return FALSE; }
/** * Returns $value if it is a valid date, FALSE otherwise. The * date is required to be in ISO 8601 format. * * @param mixed $key * @return mixed */ public function isDate($key) { return Zend_Filter::isDate($this->_source[$key]); }
/** * @deprecated since 0.8.0 * @return void */ public function testisDate() { $this->assertTrue(Zend_Filter::isDate('1997-07-16'), '"1997-07-16" is a valid date'); $this->assertFalse(Zend_Filter::isDate('1977-20-08'), '"1977-20-08" is not a valid date'); }
/** * Returns $value if it is a valid date, FALSE otherwise. The * date is required to be in ISO 8601 format. * * @param mixed $key * @return mixed */ public function testDate($key = null) { if (!($value = $this->keyExists($key))) { return false; } if (Zend_Filter::isDate($value)) { return $value; } return FALSE; }