Xaraya / Postnuke CVS Notices - Message

Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites

View Statistics - Next Notice - Previous Notice

Directory filter : [ all ] / postnuke_modules / postcalendar [ view in CVS ]

Date Directory [filter] File(s) [view] Author [filter]
02 Oct 2002 12:42:58postnuke_modules/postcalendarsmarty_plugins.php,1.5,1.6Roger Raymond
 added LOCALE setting for date/time functions

Update of /home/cvsroot/postnuke_modules/postcalendar
In directory ns7.hostnuke.net:/tmp/cvs-serv22666

Modified Files:
	smarty_plugins.php 
Log Message:
added LOCALE setting for date/time functions


Index: smarty_plugins.php
===================================================================
RCS file: /home/cvsroot/postnuke_modules/postcalendar/smarty_plugins.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** smarty_plugins.php	2 Oct 2002 12:19:07 -0000	1.5
--- smarty_plugins.php	2 Oct 2002 12:42:56 -0000	1.6
***************
*** 87,90 ****
--- 87,91 ----
  {
      extract($args);
+     setlocale(LC_TIME, _PC_LOCALE);
      if(!isset($format)) {
          $format = pnModGetVar('PostCalendar','pcEventDateFormat');
***************
*** 92,96 ****
      if(isset($date)) {
          list($y,$m,$d) = explode('-',$date);
-         //echo strftime($format,mktime(0,0,0,$m,$d,$y));
          echo strftime($format,smarty_make_timestamp($date));
      } else {
--- 93,96 ----
***************
*** 101,111 ****
  function postcalendar_smarty_pc_date_format($string, $format=null, $default_date=null)
  {   
      if(empty($format)) {
          $format = pnModGetVar('PostCalendar','pcEventDateFormat');
      }
  	if($string != '') {
!     	return date($format, smarty_make_timestamp($string));
  	} elseif (isset($default_date) && $default_date != '') {		
!     	return date($format, smarty_make_timestamp($default_date));
  	} else {
  		return;
--- 101,112 ----
  function postcalendar_smarty_pc_date_format($string, $format=null, $default_date=null)
  {   
+     setlocale(LC_TIME, _PC_LOCALE);
      if(empty($format)) {
          $format = pnModGetVar('PostCalendar','pcEventDateFormat');
      }
  	if($string != '') {
!     	return strftime($format, smarty_make_timestamp($string));
  	} elseif (isset($default_date) && $default_date != '') {		
!     	return strftime($format, smarty_make_timestamp($default_date));
  	} else {
  		return;


Directory filter : [ all ] / postnuke_modules / postcalendar [ view in CVS ]

View Statistics - Next Notice - Previous Notice


Visit Developer Site - Browse CVS Repository Syndicate via backend.rss
(max. once per hour please)
Powered by CVSNotice 0.1.3