The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

web 2.0 dates

Hey fellow programmers,

just wondering if anyone has a code snippet or has found a tutorial on how to build web 2.0 style dates ~ i.e. "last seen online 2 hours ago", "last seen online yesterday", "last seen online 2 months ago" etc

Most likely just date manipulation based on the users last logged in time, here is a little script I wrote that gives you the difference in days. To use hours have a look at the date functions in the php manual......

lol - well the whole date thing started when I did the design, I put down things like "this comment was posted 3 days ago" and the client was like "oooh, I like how there aren't stupid dates there, but instead some friendly text, how web 2.0" etc

his one of those clients that know enough to hinder you, but not enough to realise how much work is involved :P