Skip to content

Commit 0dda73b

Browse files
authored
Update main.py
1 parent de760a8 commit 0dda73b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/empyrial/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,10 @@ def valid_range(start_date, end_date, rebalance) -> tuple:
764764
return start_date, rebalance[-1]
765765

766766
# make the end date to a datetime
767-
end_date = dt.datetime.strptime(end_date, "%Y-%m-%d")
767+
try:
768+
end_date = dt.datetime.strptime(end_date, "%Y-%m-%d")
769+
except TypeError:
770+
pass
768771

769772

770773
# gets the number of days

0 commit comments

Comments
 (0)