public function decorateTime($value, $echoToday = false, $dateFormat = null)
    {
        if (empty($value) || $value == '0000-00-00 00:00:00') {
            $value = '';
        } else {
            $value = Mage::getModel('core/date')->date($dateFormat, $value);
            $replace = array(
                Mage::getModel('core/date')->date('Y-m-d ', time()) => $echoToday ? Mage::helper('aoe_scheduler')->__('Today') . ', ' : '', // today
                Mage::getModel('core/date')->date('Y-m-d ', strtotime('+1 day')) => Mage::helper('aoe_scheduler')->__('Tomorrow') . ', ',
                Mage::getModel('core/date')->date('Y-m-d ', strtotime('-1 day')) => Mage::helper('aoe_scheduler')->__('Yesterday') . ', ',
            );
            $value = str_replace(array_keys($replace), array_values($replace), $value);
        }
        return $value;
    }
public function decorateTime($value, $echoToday = false, $dateFormat = null)
    {
        if (empty($value) || $value == '0000-00-00 00:00:00') {
            $value = '';
        } else {
            $value = Mage::getModel('core/date')->date($dateFormat, $value);
            $replace = array(
                Mage::getModel('core/date')->date('Y-m-d ', time()) => $echoToday ? Mage::helper('aoe_scheduler')->__('Today') . ', ' : '', // today
                Mage::getModel('core/date')->date('Y-m-d ', strtotime('+1 day')) => Mage::helper('aoe_scheduler')->__('Tomorrow') . ', ',
                Mage::getModel('core/date')->date('Y-m-d ', strtotime('-1 day')) => Mage::helper('aoe_scheduler')->__('Yesterday') . ', ',
            );
            $value = str_replace(array_keys($replace), array_values($replace), $value);
        }
        return $value;
    }
public function decorateTime ( $ value , $ echoToday = false , $ dateFormat = null ) { if ( empty ( $ value ) || $ value == '0000-00-00 00:00:00' ) { $ value = '' ; } else { $ value = Mage :: getModel ( 'core/date' ) -> date ( $ dateFormat , $ value ) ; $ replace = array ( Mage :: getModel ( 'core/date' ) -> date ( 'Y-m-d ' , time ( ) ) => $ echoToday ? Mage :: helper ( 'aoe_scheduler' ) -> __ ( 'Today' ) . ', ' : '' , // today Mage :: getModel ( 'core/date' ) -> date ( 'Y-m-d ' , strtotime ( '+1 day' ) ) => Mage :: helper ( 'aoe_scheduler' ) -> __ ( 'Tomorrow' ) . ', ' , Mage :: getModel ( 'core/date' ) -> date ( 'Y-m-d ' , strtotime ( '-1 day' ) ) => Mage :: helper ( 'aoe_scheduler' ) -> __ ( 'Yesterday' ) . ', ' , ) ; $ value = str_replace ( array_keys ( $ replace ) , array_values ( $ replace ) , $ value ) ; } return $ value ; }
Decorate time values

@param string $value
@param bool $echoToday if true "Today" will be added
@param string $dateFormat make sure Y-m-d is in it, if you want to have it replaced
@return string
Decorate time values