Mage_Eav_Model_Entity_Attribute_Frontend_Datetime Class Reference

Inheritance diagram for Mage_Eav_Model_Entity_Attribute_Frontend_Datetime:

Mage_Eav_Model_Entity_Attribute_Frontend_Abstract Mage_Eav_Model_Entity_Attribute_Frontend_Interface

List of all members.

Public Member Functions

 getValue (Varien_Object $object)


Detailed Description

Definition at line 28 of file Datetime.php.


Member Function Documentation

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:10 2009 for Magento by  doxygen 1.5.8