MAINT: Use pandas normalize_date instead of datetime.replace

Continue standardizing on using the date normalization provided
by pandas.
This commit is contained in:
Eddie Hebert
2013-10-02 15:52:16 -04:00
parent 6ac5d49573
commit ac6a15f20a
+2 -3
View File
@@ -275,7 +275,7 @@ class PerformanceTracker(object):
perf_period.calculate_performance()
def handle_minute_close(self, dt):
todays_date = dt.replace(hour=0, minute=0, second=0, microsecond=0)
todays_date = normalize_date(dt)
minute_returns = self.minute_performance.returns
self.minute_performance.rollover()
@@ -316,8 +316,7 @@ class PerformanceTracker(object):
def handle_market_close(self):
# add the return results from today to the list of DailyReturn objects.
todays_date = self.market_close.replace(hour=0, minute=0, second=0,
microsecond=0)
todays_date = normalize_date(self.market_close)
self.cumulative_performance.update_dividends(todays_date)
self.todays_performance.update_dividends(todays_date)