Forum Moderators: coopster

Message Too Old, No Replies

Timestamp to time passed

Including months & years

         

ericjust

9:29 pm on Mar 28, 2007 (gmt 0)

10+ Year Member



I am currently using a script that calculates the difference between two timestamps and returns a string like, "35 weeks 22 hours 9 minutes ago". I am using a modified version of a script you can find by Googling "timestamp_to_time_passed".

I am wondering if anyone has a solution or knows of a script where I could include months and years. This would have to take into account different month's lengths, leap years, etc...

If anyone knows of something that would be great! Otherwise I'll have to write my own.

eelixduppy

2:18 am on Mar 29, 2007 (gmt 0)



I don't know of a script off the top of my head but I'm sure there are some at the script repositories just waiting for you. Check out sourceforge.net, hotscripts.com, or phpclasses.org to see if anything turns up. If not, I'm sure you're up to the challenge of making one yourself ;) It shouldn't be that hard, actually; we'll see.

Good luck!