From: <tim...@us...> - 2010-05-05 08:01:11
|
Revision: 3445 http://web-erp.svn.sourceforge.net/web-erp/?rev=3445&view=rev Author: tim_schofield Date: 2010-05-05 08:01:05 +0000 (Wed, 05 May 2010) Log Message: ----------- SiteMe: DateFunctions.inc - Fixed DateAdd function to correctly calculate Y/m/d dates. Modified Paths: -------------- trunk/doc/Change.log.html trunk/includes/DateFunctions.inc Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-05-05 07:46:53 UTC (rev 3444) +++ trunk/doc/Change.log.html 2010-05-05 08:01:05 UTC (rev 3445) @@ -1,6 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> <p>05/05/10 Zhiguo: PO_ReadInOrder.inc - Correct sql so that only one line per order line appears in the goods received screen</p> +<p>04/05/10 SiteMe: DateFunctions.inc - Fixed DateAdd function to correctly calculate Y/m/d dates.</p> <p>04/05/10 Tim: SelectProduct.php - Correctly display the product when selected from more than one page.</p> <p>03/05/10 Lindsay: More installer tweaks: better error handling</p> <p>03/05/10 Tim: PurchData.php - Do not show thousands seperator in price field</p> Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2010-05-05 07:46:53 UTC (rev 3444) +++ trunk/includes/DateFunctions.inc 2010-05-05 08:01:05 UTC (rev 3445) @@ -614,16 +614,17 @@ switch ($PeriodString) { case 'd': - return Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, (int)$Date_Array[2],(int)$Date_Array[1]+$NumberPeriods,(int)$Date_Array[0])); +/* Fix up the Y/m/d calculation */ + return Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, (int)$Date_Array[1],(int)$Date_Array[2]+$NumberPeriods,(int)$Date_Array[0])); break; case 'w': - return Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, (int)$Date_Array[2],(int)$Date_Array[1]+($NumberPeriods*7),(int)$Date_Array[0])); + return Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, (int)$Date_Array[1],(int)$Date_Array[2]+($NumberPeriods*7),(int)$Date_Array[0])); break; case 'm': - return Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, (int)$Date_Array[2]+$NumberPeriods,(int)$Date_Array[1],(int)$Date_Array[0])); + return Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, (int)$Date_Array[1]+$NumberPeriods,(int)$Date_Array[2],(int)$Date_Array[0])); break; case 'y': - return Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, (int)$Date_Array[2],(int)$Date_Array[1],(int)$Date_Array[0]+$NumberPeriods)); + return Date($_SESSION['DefaultDateFormat'],mktime(0,0,0, (int)$Date_Array[1],(int)$Date_Array[2],(int)$Date_Array[0]+$NumberPeriods)); break; default: return 0; @@ -860,4 +861,4 @@ return $myrow[0]; } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |