Example #1
0
 /**
  * @return string
  */
 public function __toString()
 {
     if ($this->_date instanceof Zend_Date) {
         return $this->_date->__toString();
     }
     return '';
 }
Example #2
0
 protected function _checkDate($from, $to)
 {
     $date = new Zend_Date();
     $today = strtotime($date->__toString());
     if ($from && $today < $from) {
         return false;
     }
     if ($to && $today > $to) {
         return false;
     }
     if (!$to && !$from) {
         return false;
     }
     return true;
 }
Example #3
0
 /**
  * Test for __toString
  */
 public function test_ToString()
 {
     $locale = new Zend_Locale('de_AT');
     $date = new Zend_Date(0, null, $locale);
     $date->setTimezone(date_default_timezone_get());
     $this->assertSame('01.01.1970 05:00:00', $date->__toString());
 }
Example #4
0
 /**
  * Test for __toString
  */
 public function test_ToString()
 {
     $locale = new Zend_Locale('de_AT');
     $date = new Zend_Date(0, false, $locale);
     $this->assertSame($date->__toString(), '01.01.1970 01:00:00');
 }