Skip to content

Commit 111df8e

Browse files
wiktortomczakmattip
authored andcommitted
Fix num_days in PandasAutoDateLocator (pandas-dev#14716)
1 parent 77bf04c commit 111df8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/tseries/converter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def get_locator(self, dmin, dmax):
261261
'Pick the best locator based on a distance.'
262262
delta = relativedelta(dmax, dmin)
263263

264-
num_days = ((delta.years * 12.0) + delta.months * 31.0) + delta.days
264+
num_days = (delta.years * 12.0 + delta.months) * 31.0 + delta.days
265265
num_sec = (delta.hours * 60.0 + delta.minutes) * 60.0 + delta.seconds
266266
tot_sec = num_days * 86400. + num_sec
267267

0 commit comments

Comments
 (0)