calculate diff between dates

Michael F. Stemper michael.stemper at gmail.com
Tue Jul 12 09:22:41 EDT 2022


On 12/07/2022 07.37, נתי שטרן wrote:

[snip ugly code that I'm not going to try to understand]

> 
> I glad for any help

There wasn't any question in your post. However, I'm going to
guess that there was the implied question of "How does one
find the difference between two dates?"


  >>> import datetime
  >>> d1 = datetime.date(2022,1,1)
  >>> d2 = datetime.date(2022,7,12)
  >>> d2-d1
  datetime.timedelta(192)
  >>>


-- 
Michael F. Stemper
If it isn't running programs and it isn't fusing atoms, it's just bending space.


More information about the Python-list mailing list