in reply to Determining time since

Okay, I just ran into a problem. I thought my script was right but obviously there is an error in there somewhere. My script has just now come across a time that's over an hour old and instead of converting into hours, it prints "64 minute(s) ago". What am I doing wrong?

Replies are listed 'Best First'.
Re: Re: Determining time since
by Roy Johnson (Monsignor) on Jan 12, 2004 at 15:36 UTC
    Your tests are in the wrong order. Check them in descending order, not increasing order. >60 will not fall through to >3600, because anything that's >3600 is >60.

    The PerlMonk tr/// Advocate