Skip to content

Commit

Permalink
fix #1270
Browse files Browse the repository at this point in the history
  • Loading branch information
rob committed Oct 18, 2023
1 parent 972940f commit ffd2801
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sysobjects/contract_dates_and_expiries.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ def from_str(expiryDate, date_as_str: str):
as_date = datetime.datetime.strptime(date_as_str, EXPIRY_DATE_FORMAT)
except:
raise Exception(
"Expiry date %s not in format %s" % date_as_str, EXPIRY_DATE_FORMAT
"Expiry date %s not in format %s" % (date_as_str, EXPIRY_DATE_FORMAT)
)

return expiryDate(as_date.year, as_date.month, as_date.day)
return expiryDate(year=as_date.year, month=as_date.month, day=as_date.day)

def as_str(self) -> str:
return self.strftime(EXPIRY_DATE_FORMAT)
Expand Down

0 comments on commit ffd2801

Please sign in to comment.