14 Comments to “PHP time ago calculation”

  1. Binny V A

    Feb 2nd, 2008

    When posting code, could you put it in pre tag? Otherwise the indentation is lost.

  2. Bill

    Jun 19th, 2008

    Exactly what I was looking for! Great job. Thanks for sharing.

  3. mfields

    Oct 1st, 2008

    Hi,
    Is there a license on this code…
    Looks great would love to use it!!!
    Thanks!!!

  4. Tom

    Nov 6th, 2008

    Brilliant – just what I needed. Thank you.

  5. Venkatesan

    Dec 22nd, 2008

    Really Great script. It helps me lot.
    Thanks.

  6. A1dezine

    Apr 2nd, 2009

    Great stuff. I got what i was looking. Thank you very much to share this code here, appreciated .

  7. Travis

    May 31st, 2009

    Very nice, works great! Thanks for sharing!

  8. Gopinathan

    Jun 30th, 2009

    Hi,

    Great code. Thanks for sharing. Really good

  9. Matt

    Jul 5th, 2009

    Fail, it’s littered with “&lt” and “&gt”.

  10. Tunde

    Jul 24th, 2009

    minute ago not working. Others are working perfect. I use 2009-07-23 09:11:50 as starting and 2009-07-23 09:59:50 as ending date. Can anyone help me. If you get the solution send it to tfrancislinks@yahoo.com

  11. [...] PHP Time Ago Calculation Soy Alfredo Artiles, Co-Fundador de equipo24 y e24Presenter. Mi pasión es el AJAX, SEO, SEM y [...]

  12. Theo

    Jan 28th, 2010

    Great Work !

    Thanxs !!

  13. ben

    Feb 4th, 2010

    Sorry mate, it didn’t work for me. Cheers.

  14. joomla

    Mar 3rd, 2010

    add one line “$datefrom = strtotime($datefrom);” right after “function TimeAgo($datefrom,$dateto=-1)
    {” to display your time properly. I was thinking what is missing, but as you mention above mention line, it will work fine…

    thanks for the great code!


Leave a Reply