Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Humanized time for node apps

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 package.json
Octocat-spinner-32 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>
Something went wrong with that request. Please try again.