library/Garp/DateTime.php
public static function formatFromConfig($type, $date) {
        $ini = Zend_Registry::get('config');
        $format = $ini->date->format->$type;

        if (strpos($format, '%') !== false) {
            return strftime($format, strtotime($date));
        } else {
            return date($format, strtotime($date));
        }
    }
public static function formatFromConfig($type, $date) {
        $ini = Zend_Registry::get('config');
        $format = $ini->date->format->$type;

        if (strpos($format, '%') !== false) {
            return strftime($format, strtotime($date));
        } else {
            return date($format, strtotime($date));
        }
    }
public static function formatFromConfig ( $ type , $ date ) { $ ini = Zend_Registry :: get ( 'config' ) ; $ format = $ ini -> date -> format -> $ type ; if ( strpos ( $ format , '%' ) !== false ) { return strftime ( $ format , strtotime ( $ date ) ) ; } else { return date ( $ format , strtotime ( $ date ) ) ; } }
Format a date according to a format set in the global configuration
Format a date according to a format set in the global configuration