예제 #1
0
파일: Input.php 프로젝트: fferriere/web
 /**
  * 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;
 }
예제 #2
0
 /**
  * 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;
 }
예제 #3
0
 /**
  * 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]);
 }
예제 #4
0
 /**
  * @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');
 }
예제 #5
0
 /**
  * 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;
 }