Example #1
0
 public function testConvertIsoToPhpFormat()
 {
     foreach ($this->tabPhp2Iso as $key => $val) {
         $result = Centurion_Locale_Format::convertIsoToPhpFormat($val);
         $this->assertEquals($key, $result);
     }
 }
Example #2
0
 /**
  * Class contructor
  *
  * @param Zend_Controller_Request_Abstract $request
  * @param Zend_Controller_Response_Abstract $response
  * @param array $invokeArgs
  * @return void
  */
 public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     if (null == $this->_dateFormat) {
         $this->_dateFormatIso = Zend_Locale_Data::getContent(null, 'date', array('gregorian', 'short'));
         $this->_dateFormat = Centurion_Locale_Format::convertIsoToDatepickerFormat($this->_dateFormatIso);
     } else {
         $this->_dateFormatIso = Centurion_Locale_Format::convertDatepickerToIsoFormat($this->_dateFormat);
     }
     $this->_timeFormatIso = Zend_Locale_Data::getContent(null, 'time', array('gregorian', 'short'));
     parent::__construct($request, $response, $invokeArgs);
     $this->view->dateFormat = $this->_dateFormat;
 }
Example #3
0
 /**
  * @dataProvider getDataTabPhp2Iso
  */
 public function testConvertIsoToPhpFormat($key, $val)
 {
     $result = Centurion_Locale_Format::convertIsoToPhpFormat($val);
     $this->assertEquals($key, $result);
 }