Menu
show-notice
hide-notice

How To Add Timeago Format In Blogger Post Date

on 17 August 2013

timeago for blogger
You might seen "a second ago" or "2 minute ago..." in social networking site especially twitter and Facebook. This represent the time in timestamps which was posted before (a certain time) instead of showing full date like 17/08/2013 10:45 pm.

When you post an article, it will display the minutes ago, so reader can understand that your post was published little earlier. Exactly blogger doesn't have this feature (timeago format), but blogger does provide time with date, name of month etc.

Today I'm going to show you how to add timeago time format in blogger. This timeago script will display the second, minutes, hours, days and years (ago) instead of full date. It automatically update the timestamps. This plugin was developed by Ryan McGeary of Yarp. Here I have converted that code for blogger platform to easily implement in blog.

Live Demo: please go to main page of this blog and check below each post box.

For example: few other timeago plugin show "1 minute ago" even though the page was opened 10 minutes ago. Unlike this plugin update the timestamps automatically without refreshing the webpage. Just do the the following steps to add timeago in blogger.

  1. Go to blogger > Template > Edit HTML.
  2. Find  </head> tag and add the following code before it.
  3. <script src='http://code.jquery.com/jquery-latest.js'></script>
    <script src='http://timeago.yarp.com/jquery.timeago.js'></script>
    <script>
        jQuery(document).ready(function($){
         $("abbr.timeago").timeago()
    
        });
        </script>
    
    [optional: Remove the code in line #1 if you have already implemented jQuery in your blog
  4. Now find code similar to below code. May be you couldn't find exact below code in your template because different custom blogger template provider use their own mark up for the timestamps. So you have to post your blog URL in comment below, then I can give you the exact code that you want to find in your blog.
  5. <h2 class='date-header'><span><data:post.dateHeader/></span></h2>
    
  6. Replace above code with following code
  7. <abbr class="timeago" expr:title="data:post.timestampISO8601"><data:post.dateHeader/></abbr>
    
  8. Now Save your template. That's all

Please provide your blog url in comment if you can't find the code in 3rd step. Now your blog can display minutes ago as well. Instead of showing the date. But I recommend to show timeago in main page only. Not in post page. Post your feedback about this plugin in comment.

SHARE

24 comments:

  1. Great, I just added this in my blogg. Thank you.
    Also my compliments for your blogg and especially for the the fast support that you offer. I wish you all the best :)

    ReplyDelete
    Replies
    1. You are welcome.
      Thank you for valuable comment.

      Delete
  2. Is it possible to costumize the language ?

    minutes ago = (xxxx)
    days ago = (xxxx)
    months ago = (xxxx)
    years ago = (xxxx)

    Thanks

    ReplyDelete
  3. How about timeago for blogger's comment ?
    I have a blog,which is already installed this function for posts,here.

    ReplyDelete
    Replies
    1. Find the HTML of comment timestamps and replace with 4 step code. Please provide me a post which has comments in it. So i can give you exact code that you want to change.

      Delete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Thanks successfully implemented and it is nice to see the counting of posting, here is my blog

    www.mohanmekap.com

    ReplyDelete
  6. Im foto payudara thank's for sharing inmportant post. Matemingler is the number one dating site for singles seeking long-term relationships. Join for free to be matched with compatible singles.

    ReplyDelete
  7. I could not, can you give me some alternative? my site: http://www.descontraindo.com.br/

    I'm from Brazil, sorry the bad english ;)

    ReplyDelete
  8. No.1 Travel Info Website
    www.aurangabadtravel.info
    thanks for code gr8

    ReplyDelete
  9. No. Space blog in Turkey

    www.haberuzay.com

    ReplyDelete
  10. this is best blogger tips thank you so mush ;)

    ReplyDelete
  11. nice
    but can some one please tell me how to show this time formate in home page

    ReplyDelete
  12. Hi,
    This is not working on my blog.
    Please reply how to do this?
    My website www.savingbaba.com

    ReplyDelete
  13. nice, it working perfectly.. thank you for share

    ReplyDelete
  14. nice, it working perfectly.. thank you for share

    ReplyDelete
  15. Wow excellent post, thanks a lot! If you ever need a трассоискатель just let me know!

    ReplyDelete
  16. yes sure. i thnk like you to. but when i want to get a much backlink, i get a trouble. whyy?? .. i'll get a backlink for my blog. it's tipepedia

    ReplyDelete
  17. Thank you so much. It's work great for me.

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. Hello and thank you for posting this. I am using a blogger template. I have managed to update the actual post page and the search label page. However, I cannot figure out how to change the posts on my homepage. Can you help please? Thank you in advance! Here is my url: (http://askdoc2016.blogspot.com/)

    ReplyDelete
  20. AnonymousJune 14, 2020

    doesnt worj for me pleaaase help;.. https://site24news.blogspot.com/

    ReplyDelete
  21. Dating sites play a big role for today's generation in the developed world. They find the people of their choice through this dating site. / hk.love  This is one of the best dating sites. 

    ReplyDelete

Important -Comments with Links will be deleted immediately upon our review and If you are asking a question click the 'Subscribe By Mail' link below the comment form to be notified of replies.