Skip to content
:clock9: Humanized time for node apps
JavaScript
Find file
Latest commit c20e680 Sep 30, 2014 @ecto bump version to 0.2.0
Failed to load latest commit information.
.gitignore gitignore Apr 24, 2013
README.md Update readme to reflect changes Jun 28, 2012
package.json bump version to 0.2.0 Sep 30, 2014
timeago.js Support also a number timestamp Jun 11, 2013

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>
Something went wrong with that request. Please try again.