Humanized time for node apps
JavaScript
Pull request Compare This branch is 7 commits behind ecto:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.md
package.json
timeago.js

README.md

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>