[Scipy-svn] r2485 - trunk/Lib/sandbox/timeseries

scipy-svn at scipy.org scipy-svn at scipy.org
Thu Jan 4 10:02:22 CST 2007


Author: mattknox_ca
Date: 2007-01-04 10:02:18 -0600 (Thu, 04 Jan 2007)
New Revision: 2485

Modified:
   trunk/Lib/sandbox/timeseries/tsdate.py
Log:
fixed bug with modifying value parameter passed in

Modified: trunk/Lib/sandbox/timeseries/tsdate.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tsdate.py	2007-01-04 06:03:07 UTC (rev 2484)
+++ trunk/Lib/sandbox/timeseries/tsdate.py	2007-01-04 16:02:18 UTC (rev 2485)
@@ -14,7 +14,7 @@
             if self.freq == 'D':
                 self.mxDate = mx.DateTime.DateTimeFromAbsDays(value-1)
             elif self.freq == 'B':
-                value -= 1
+                value = value - 1
                 self.mxDate = mx.DateTime.DateTimeFromAbsDays(value + (value//5)*7 - (value//5)*5)
             elif self.freq == 'S':
                 self.mxDate = secondlyOriginDate + mx.DateTime.DateTimeDeltaFromSeconds(value)
@@ -60,7 +60,6 @@
                 self.mxDate = mx.DateTime.Date(year, month, day, _hours, _minutes, _seconds)
                 
         self.value = self.__value()
-                        
                 
     def day(self):          return self.mxDate.day
     def day_of_week(self):  return self.mxDate.day_of_week



More information about the Scipy-svn mailing list