Hi.. everyone!
I've noticed that Facebook, Twitter, and lots of other sites are using a relative date and time string description for user posts and comments. For example, "comment written about 3 months ago" instead of "comment written on September 20, 2012." I decided to do the same thing on my site. In my site I need to display 1 day ago, 2 days ago, 3 days ago,...... 1 week ago, 2 weeks ago, .... 1 months ago, 2 months ago, ...... 1 year ago, 2 years ago... etc. Already I have got user registered date and need to check it with current date and time and need to diplay it with above style on my home page.
In my database, user registered date format is like this .. '2012-09-23 09:11:02'
can anybody help me to build this script... and it will greatly appriciated.
Thank you.