| [ Index ] |
krapohl.info |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * $Id: modifier.pc_date_format.php,v 1.2 2004/02/12 19:48:36 larsneo Exp $ 4 * 5 * PostCalendar::PostNuke Events Calendar Module 6 * Copyright (C) 2002 The PostCalendar Team 7 * http://postcalendar.tv 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 2 of the License, or 12 * (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 * 23 * To read the license please read the docs/license.txt or visit 24 * http://www.gnu.org/copyleft/gpl.html 25 * 26 */ 27 if(pnModAvailable('pnRender')){ 28 require_once $smarty->_get_plugin_filepath('shared','make_timestamp'); 29 } else { 30 require_once $this->_get_plugin_filepath('shared','make_timestamp'); 31 } 32 function smarty_modifier_pc_date_format($string, $format=null, $default_date=null) 33 { 34 setlocale(LC_TIME, _PC_LOCALE); 35 if(empty($format)) { 36 $format = _SETTING_DATE_FORMAT; 37 } 38 if($string != '') { 39 return strftime($format, smarty_make_timestamp($string)); 40 } elseif (isset($default_date) && $default_date != '') { 41 return strftime($format, smarty_make_timestamp($default_date)); 42 } else { 43 return; 44 } 45 } 46 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Feb 16 22:40:07 2005 | Cross-referenced by PHPXref 0.6 |