How to define distance in time in words in pure javascript?
<p>I would like to include very common feature in my web application. I would like the times/dates be written as the distance of time from now in words, for example (2 hours ago). </p>

<p>Rails have excellent implementation of this functionality, but I need something like that written in pure javascript. The problem is, that lots of pages in my application are cached, and the only thing that would change is the actual time. </p>

<p>Are there any extended libraries in JS which could translate a date to a distance of time in words? </p>
