Package to calculate time diff

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm wondering which package can do time diff calculation. I.e., something
that can do time_diff 0:40:33 0:28:50 and gives me 00:11:43.

I've tried Date::Simple, Date::Calc, Class::Date and DateTime, but none
of them can. Maybe I'm too blunt, so I'm not going to show my stupid
trials here.

Thanks for your help.

Tong (remove underscore(s) to reply)
  *niX Power Tools Project: /
  - All free contribution & collection

Re: Package to calculate time diff

* Tong * wrote:
Quoted text here. Click to load it

Perhaps you would prefer to use Ruby:

class String
  def to_time

def timediff( t1, t2 ) - t1.to_time).gmtime.strftime("%H:%M:%S")

puts timediff( '0:28:50', '0:40:33' )

Site Timeline