Skip to content

Commit

Permalink
#434 bug in dow_str
Browse files Browse the repository at this point in the history
  • Loading branch information
tevpg committed Jun 21, 2024
1 parent 0f5fc35 commit 7b48c89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/tt_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ def dow_str(iso_dow_or_date: int, dow_str_len: int = 0) -> str:
If dow_len is not specified then returns whole dow name.
"""
if isinstance(iso_dow_or_date,str):
iso_dow = dow_int(iso_dow_or_date)
iso_dow = str(iso_dow)
iso_dow_or_date = dow_int(iso_dow_or_date)
iso_dow = str(iso_dow_or_date)
dow_str_len = dow_str_len if dow_str_len else 99
d = datetime.datetime.strptime(f"2023-1-{iso_dow}", "%Y-%W-%u")
return date_str(d.strftime("%Y-%m-%d"), dow_str_len=dow_str_len)
Expand Down

0 comments on commit 7b48c89

Please sign in to comment.