I have the following code:
commit_date = get_last_commit_date() # returns datetime obj: 2022-08-25 13:32:12
pr_date = datetime.fromisoformat(ISO_CODE) # returns 2022-08-24 19:15:07
Notice how commit_date is Aug. 25 and pr_date is Aug. 24. I want to find the difference in days which should be 1 day.
Now doing print((pr_date - commit_date).days) will give -1 days. So naturally I swap them and do print((commit_date - pr_date).days) but it reports 0 days? How can it be 0 days? Why isn't it reporting 1 day time difference?