eggheadio-github/stack-overflow-copy-paste

timeSince function to format a JavaScript Date as a string stating the time elapsed e.g "4 mins ago"

Closed this issue · 2 comments

Hi Kent!

I found your Youtube live stream "Contributing to Open Source on GitHub for beginners". It was very inspiring and gave me a whole new perspective.

I'd like to add a feature to format JS Date to a string based on how much time has elapsed, e.g "5 hours ago" like Instagram shows time.
It's inspired by this answer on StackOverflow.

https://stackoverflow.com/a/3177838/8301717

Sounds great @soumikcv!

Great job!