Pommo_Helper::timeGetFormat PHP Method

timeGetFormat() public method

Returns the current dateformat as a string
public timeGetFormat ( )
    function timeGetFormat()
    {
        switch (Pommo::$_dateformat) {
            case 2:
                $format = 'MM/DD/YYYY';
                break;
            case 3:
                $format = 'DD/MM/YYYY';
                break;
            default:
                $format = 'YYYY/MM/DD';
                break;
        }
        return $format;
    }

Usage Example

Example #1
0
 function Pommo_Template()
 {
     // set theme -- TODO; extend this to the theme selector
     $this->_pommoTheme = 'default';
     // set directories
     $this->_themeDir = Pommo::$_baseDir . 'themes/';
     $this->template_dir = $this->_themeDir . $this->_pommoTheme;
     $this->config_dir = $this->template_dir . '/inc/config';
     // set base/core variables available to all template
     $this->assign('url', array('theme' => array('shared' => Pommo::$_baseUrl . 'themes/shared/', 'this' => Pommo::$_baseUrl . 'themes/' . $this->_pommoTheme . '/'), 'base' => Pommo::$_baseUrl, 'http' => Pommo::$_http));
     $this->assign('config', @array('app' => array('path' => Pommo::$_baseDir, 'weblink' => '<a href="http://github.com/soonick/poMMo">' . Pommo::_T('poMMo Website') . '</a>', 'dateformat' => Pommo_Helper::timeGetFormat()), 'site_name' => Pommo::$_config['site_name'], 'site_url' => Pommo::$_config['site_url'], 'list_name' => Pommo::$_config['list_name'], 'admin_email' => Pommo::$_config['admin_email'], 'demo_mode' => Pommo::$_config['demo_mode']));
     // set gettext overload functions (see block.t.php...)
     $this->_gettext_func = array('Pommo', '_T');
     // calls Pommo::_T($str)
     $this->_gettext_plural_func = array('Pommo', '_TP');
     // assign page title
     $this->assign('title', '. ..poMMo.. .');
     // assign section (used for sidebar template)
     $this->assign('section', Pommo::$_section);
 }
All Usage Examples Of Pommo_Helper::timeGetFormat