AshishJoshi-asj / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Date formatter not using Zend_Locale #155

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

The Date formatter can use Zend_Locale if set in Registry. Here is the
possible change of original the Date.php formatter

line 36:
} elseif (is_array($options)) {  <<-- changed
  foreach($options as $k=>$v){
    switch($k){
    case 'locale':
      $this->locale = $v;
      break;
    case 'date_format':
     $this->date_format = $v;
     break;
    case 'type':
     $this->type = $v;
     break;
    default:
// changed for translation
      throw new Exception($this->__("Unknown option '$k'."));
    }
   }
// added start
  } else {
    if (Zend_Registry::isRegistered('Zend_Locale')) {
      $this->locale = Zend_Registry::get('Zend_Locale');
    }
// added end
  }

1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
0.6alpha

Please provide any additional information below.
This Date formatter handles datetime and timestamp as well

Original issue reported on code.google.com by vlatko.b...@gmail.com on 12 Feb 2010 at 3:51

GoogleCodeExporter commented 9 years ago
Done,

Thanks,

Original comment by pao.fre...@gmail.com on 12 Feb 2010 at 4:07

GoogleCodeExporter commented 9 years ago
Confirmed.

Original comment by vlatko.b...@gmail.com on 16 Feb 2010 at 11:57

GoogleCodeExporter commented 9 years ago

Original comment by bento.vi...@gmail.com on 3 Mar 2010 at 4:56