Jump to content

Recommended Posts

This will include timestamp in which is in the database, and current time.

I want to be able to display a timestamp, not in a date format. eg: y,m,d etc.

But in a .. "x days ago" method.

If the timestamp in the database is.. within 24 hours from current time, it'll display "posted X hours ago"

If the timestamp is within 1 hour, it'll display "Posted X minutes ago"

Else if the timestamp is bigger than 24 hours, it'll display "Posted x days ago"

 

How can this be done?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.