Calculating timespan

Erhard nospam at
Sun Sep 28 11:36:13 CEST 2008

marek.rocki at wrote:
> from datetime import datetime, timedelta
> span = -
> datetime(year=2008,month=8,day=27,hour=12,minute=34,second=56)
> if span < timedelta(minutes=37):
>     # do something

timedelta! Yes, it's obvious that's what I was looking for. I was stuck 
with 'timespan' in my head and couldn't find anything like it in the docs.

Thank you very much!

More information about the Python-list mailing list