Re: Calculating timespan

2008-09-28 Thread Erhard
[EMAIL PROTECTED] wrote: from datetime import datetime, timedelta span = datetime.now() - 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' i

Re: Calculating timespan

2008-09-28 Thread marek . rocki
Erhard napisaƂ(a): > I've been looking at the date/time classes and I'm at a loss as to how > to do this (probably too used to other platforms). > > I have two date/time values. One represents 'now' and the other the last > modified time of a file on disk (from stat). I need to calculate the > diff

Calculating timespan

2008-09-28 Thread Erhard
I've been looking at the date/time classes and I'm at a loss as to how to do this (probably too used to other platforms). I have two date/time values. One represents 'now' and the other the last modified time of a file on disk (from stat). I need to calculate the difference in time (i.e., a 't