Skip to content

Commit ee602cb

Browse files
committed
Fix end date of month splits
1 parent d296148 commit ee602cb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

notebook_helper.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,13 @@ def monthlist(start,end):
181181
next_month = start.replace(month=start.month+1, day=1)
182182
if next_month > end:
183183
break
184-
result.append(start.strftime("%Y%m%d")+'-'+last_day_of_month(start).strftime("%Y%m%d"))
184+
result.append(
185+
start.strftime("%Y%m%d") + \
186+
'-' + \
187+
(
188+
last_day_of_month(start) + datetime.timedelta(days=1)
189+
).strftime("%Y%m%d")
190+
)
185191
start = next_month
186192

187193
if start != end:

0 commit comments

Comments
 (0)