humanize time difference (how long ago)
If you ever have a need to display something like: "last update 5 days ago" "user logged in 2 mins ago" you can use this script to determine how long ago a timestamp is versus now().
- time
- now
- humanize
If you ever have a need to display something like: "last update 5 days ago" "user logged in 2 mins ago" you can use this script to determine how long ago a timestamp is versus now().
supsupmo has posted 1 snippet.