• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Smarty/libs/plugins/modifier.date_format.php

00001 <?php
00011 require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
00030 function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null)
00031 {
00032     if (substr(PHP_OS,0,3) == 'WIN') {
00033            $_win_from = array ('%e',  '%T',       '%D');
00034            $_win_to   = array ('%#d', '%H:%M:%S', '%m/%d/%y');
00035            $format = str_replace($_win_from, $_win_to, $format);
00036     }
00037     if($string != '') {
00038         return strftime($format, smarty_make_timestamp($string));
00039     } elseif (isset($default_date) && $default_date != '') {
00040         return strftime($format, smarty_make_timestamp($default_date));
00041     } else {
00042         return;
00043     }
00044 }
00045 
00046 /* vim: set expandtab: */
00047 
00048 ?>

Generated on Thu Apr 19 2012 17:01:16 for openbiz by  doxygen 1.7.2