Skip to content

Commit

Permalink
edit clear sheet fuinction
Browse files Browse the repository at this point in the history
  • Loading branch information
inerttila committed Jan 29, 2024
1 parent 8afca00 commit b732e85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions excel.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ def is_last_entry_on_sunday(worksheet):

last_date_value = worksheet.cell(row=worksheet.max_row, column=1).value
if last_date_value is not None:
if not isinstance(last_date_value, datetime.datetime):
last_date_value = datetime.datetime.strptime(
last_date_value, "%Y-%m-%d")
last_date_value = datetime.datetime.strptime(
last_date_value, "%Y-%m-%d")
# Friday is represented as 4 in the weekday() function
return last_date_value.weekday() == 4
return False



Expand Down

0 comments on commit b732e85

Please sign in to comment.