[LRUG] Finding the duration between two DateTimes

Timothy Cowlishaw timcowlishaw at gmail.com
Sun May 27 06:17:01 PDT 2007


On 27 May 2007, at 14:02, Timothy Cowlishaw wrote:

>
> Firstly, I'm not sure what this duration refers to - presumably it  
> isn't seconds, as there are 3600 seconds in an hour, so this figure  
> should be < 3600, in that case, allowing for a few seconds to pass  
> between setting the start_time and the end_time. Would anyone be  
> able to enlighten me on this?
>

Apologies for my exceedingly poor maths. Of course, the duration will  
be marginally greater 3600 secs, rather than less, so this presumably  
is the duration in seconds, please disregard the first half of my  
question.

However, I'd still be very curious to know if this can be casted as  
some sort of class that represents a duration, rather than simply as  
an integer. Any ideas?

Cheers,

Tim







More information about the Chat mailing list