timeago

A wrapper for Ryan McGeary's Pretty Date function

npm install timeago
7 downloads in the last day
31 downloads in the last week
316 downloads in the last month

timeago

A wrapper for Ryan McGeary's jQuery plugin.

timeago

install

npm install timeago

usage

var timeago = require('timeago');

var pretty = timeago(+new Date());

console.log(pretty); // just now

You can also use it in Express app templates:

var app = express.createServer();

app.helpers({
  timeago: require('timeago')
});
<div class="timeago"><%- timeago(widget.created) %></div>
npm loves you