(Apr-25-2023, 08:37 AM)DeaD_EyE Wrote: I used the timedealta. Obviously, one day is missing.Obviously
datetime.date(2021, 1, 1)
is not being counted, i.e. year "starts" at 2 January up to and incl. 31 December.>>> import datetime >>> datetime.date(2021, 12, 31) - datetime.date(2020, 12, 31) datetime.timedelta(days=365) >>> datetime.date(2020, 12, 31) - datetime.date(2019, 12, 31) datetime.timedelta(days=366)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs