Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (21 sloc) 946 Bytes
A better way to display relative dates using JavaScript. Instead of a raw date
string, this script will return strings like "2 hours ago" or "5 days".
JavaScript Usage: (returns string)
humaneDate(new Date);
jQuery Plugin Usage:
<span title="2008-01-28T20:24:17Z">January 1, 2008 20:24:17 GMT</span>
<time datetime="2008-01-28T20:24:17Z">January 1, 2008 20:24:17 GMT</time>
To run the full test suite:
cd test
Copyright (c) 2008 Dean Landolt (
Re-write by Zach Leatherman (
Adopted from the John Resig's pretty.js
and henrah's proposed modification
Licensed under the MIT license.
See more at
Something went wrong with that request. Please try again.