9 thoughts on “WordPress Improved Human Time Difference Leave a comment

  1. Pingback: WordPress Improved Human Time Difference
    1. ah ha – good catch. I must have written the comment wrong 🙂 90 days it is. Also an easy fix if you do want it to be 60 days.

      Thanks for pointing it out – I shall correct the code.

  2. Very informative. I’d modified this code to my blog. This is really important to calculate publishing time. I didn’t see anybody who is using this so this is the first time I’ve found this here. Thank you in advance for this code.

  3. Hi,

    We used your code a lot! But are now bumping into a problem. As we start using a cache plugin, the time ago only updates when the cache is cleared. And that a bummer. Is it somehow possible to alternate this to an ajax based one?

    1. thank – you’re right that this wouldn’t work so well with caching plugins. To be honest I hadn’t really considered that. It’s definitely possible to do this with javascript but it’s not something I have time to do myself. Personally if I were to write is in javascript I would output a standard WordPress time and date, and add a data property that has the post timestamp. Then I’d use javascript to replace the time and date with the human time diff calculated by the timestamp.

  4. Hi Ben,

    thank you for your response, and i understand it. It’s a very nice code and tutorial.
    I think i found a plugin that we can try out. So hopefully that would work.

  5. So Great! It would much better if it had more conditions, for example if less than a minut then show “1 min ago”.
    but anyway, great job

Leave a Reply

Your email address will not be published.