I am trying to extract unix timestamp from mysql and convert it to ISO8601 timestamp. I need it in order to format date into facebook-like(or stack-overflow-like:) ’30 minutes ago’ instead of displaying the exact date and time. Has anyone dealt with it?
Share
But there are built-in functions to help you with this if you don’t want to roll your own, e.g.: DateTime::diff.