Skip to content

Commit 8c80b6b

Browse files
wiktortomczakjorisvandenbossche
authored andcommitted
Fix num_days in PandasAutoDateLocator (#14716)
1 parent 92239f5 commit 8c80b6b

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)