Public Member Functions | |
getValue (Varien_Object $object) |
Definition at line 28 of file Datetime.php.
getValue | ( | Varien_Object $ | object | ) |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Frontend_Abstract.
Definition at line 30 of file Datetime.php.
00031 { 00032 $data = ''; 00033 $value = parent::getValue($object); 00034 $format = Mage::app()->getLocale()->getDateFormat( 00035 Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM 00036 ); 00037 00038 if ($value) { 00039 try { 00040 $data = Mage::getSingleton('core/locale')->date($value, Zend_Date::ISO_8601, null, false)->toString($format); 00041 } catch (Exception $e) { 00042 $data = Mage::getSingleton('core/locale')->date($value, null, null, false)->toString($format); 00043 } 00044 } 00045 00046 return $data; 00047 }