From: <var...@us...> - 2009-12-04 17:08:29
|
Revision: 7282 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7282&view=rev Author: vargenau Date: 2009-12-04 17:08:19 +0000 (Fri, 04 Dec 2009) Log Message: ----------- Strip leading zeros from date elements as in French "09 mai 2009" Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2009-12-04 15:33:47 UTC (rev 7281) +++ trunk/lib/WikiTheme.php 2009-12-04 17:08:19 UTC (rev 7282) @@ -309,7 +309,7 @@ // //////////////////////////////////////////////////////////////// - // Note: Windows' implemetation of strftime does not include certain + // Note: Windows' implementation of strftime does not include certain // format specifiers, such as %e (for date without leading zeros). In // general, see: // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_strftime.2c_.wcsftime.asp @@ -355,11 +355,12 @@ */ function formatDate ($time_t) { global $request; - + $offset_time = $time_t + 3600 * $request->getPref('timeOffset'); - // strip leading zeros from date elements (ie space followed by zero) - return preg_replace('/ 0/', ' ', - strftime($this->_dateFormat, $offset_time)); + // strip leading zeros from date elements (ie space followed by zero + // or leading 0 as in French "09 mai 2009") + return preg_replace('/ 0/', ' ', preg_replace('/^0/', ' ', + strftime($this->_dateFormat, $offset_time))); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |