I would like to include a very common feature in my web application. I would like time / dates to be written as the distance of time from now on in words, for example (2 hours ago).
Rails perfectly implements this functionality, but I need something like written in pure javascript. The problem is that many pages in my application are cached, and the only thing that will change is time.
Does JS have extended libraries that can translate a date to a distance of time in words?
mdrozdziel
source share