Jump to content

Posted 2 days ago - How would I do something similar


TeddyKiller

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.