Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 592295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:43:30+00:00 2026-05-13T15:43:30+00:00

I have page where where I list all comments for a post. Next to

  • 0

I have page where where I list all comments for a post. Next to each comment I have a time value in full format including the date/time (2010-01-02 11:11:20).

I know that I can format it in PHP before displaying it, so it shows;

posted 40 secs ago 
posted 5 days ago

but that would not be efficient as I am going to cache the page once it is generated.

On SO I see that they have some kind of java script for showing it, so it is run on the browser of the client:

alt text http://img528.imageshack.us/img528/5442/35118769.png

So basically I need a java script that runs on the browser that would instead of showing my date/time show “posted 4 hours ago”. All help is welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:43:30+00:00Added an answer on May 13, 2026 at 3:43 pm

    Sounds you want this: timeago: a jQuery plugin.

    Timeago is a jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").

    I quote further:

    • Avoid timestamps dated "1 minute ago" even though the page was opened 10 minutes ago; timeago refreshes automatically.

    • You can take full advantage of page caching in your web applications, because the timestamps aren’t calculated on the server.

    So it should fit your needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dropdownlist in a page. The values of all the list items
I have a page in my application that refreshes some content (a list of
I have a simple accordion type page containing a list of H3 headers and
I have a list of bean objects passed into my JSP page, and one
I have a asp.net page where i query a list of url and the
I have a software diagnostic page on which I would like to list the
I have a ListView on a page that displays a list of widgets. When
I have a page that is generated which inserts an HTML comment near the
I have a list of Person s each which have multiple fields that I
Here's the problem: 1.) We have page here... www.blah.com/mypage.html 2.) That page requests a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.