I have a database table with articles and each one of this articles have a submitted date. I need to calculate the days and hours since the article have been published in the database, like:
This article has been published 4 hours ago.
This article has been published 3 days and 4 hours ago.
There are already some code that I can reuse to do this? I've searched on google, but maybe I'm not using the correct words.
Any clue that could help me?
Best Regards,