in reply to Showing the time difference in a natural format?

I found Time::Duration

ago( $now - $then, 1 )

Caveats:

  • Comment on Re: Showing the time difference in a natural format? (Time::Duration)
  • Download Code

Replies are listed 'Best First'.
Re^2: Showing the time difference in a natural format? (Time::Duration)
by skx (Parson) on Sep 21, 2008 at 21:48 UTC

    That looks ideal for me, even with the simplifications. ++

    Looking at the name I'm amazed I didn't find that myself.

    Steve
    --
      I searched for "time ago". Unfortunately, many time zones have "ago" in their name (such as "Chicago"). And it either ignored "ago" or it came up lots of irrelevant Time:: modules after those that had "time" and "ago" in their name.

      Update: Since I couldn't stop after the first sentence, the post lost all value. Ignore it :)