PHPackages                             rmm5t/jquery-timeago - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rmm5t/jquery-timeago

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rmm5t/jquery-timeago
====================

jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").

v1.6.7(7y ago)3.8k174.2k↑25.6%702[17 PRs](https://github.com/rmm5t/jquery-timeago/pulls)1MITJavaScriptCI passing

Since Feb 3Pushed 1y ago92 watchersCompare

[ Source](https://github.com/rmm5t/jquery-timeago)[ Packagist](https://packagist.org/packages/rmm5t/jquery-timeago)[ Docs](http://timeago.yarp.com/)[ RSS](/packages/rmm5t-jquery-timeago/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (12)Used By (1)

timeago: a jQuery plugin
========================

[](#timeago-a-jquery-plugin)

[![NPM](https://camo.githubusercontent.com/266f14a8b720011d41d9b37b4b276032dd25fc8b9c09f6f73f68170dd74abe25/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f74696d6561676f2e737667)](https://www.npmjs.com/package/timeago)[![Bower](https://camo.githubusercontent.com/ed13b4e6ce4fc3903420f80dbe40d79c3ff7d19da08126002f4d54a6cc2799cc/68747470733a2f2f696d672e736869656c64732e696f2f626f7765722f762f6a71756572792d74696d6561676f2e737667)](http://bower.io/search/?q=jquery-timeago)

Timeago is a jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago") from ISO 8601 formatted dates and times embedded in your HTML (à la microformats).

Usage
-----

[](#usage)

First, load jQuery and the plugin:

```

```

Now, let's attach it to your timestamps on DOM ready - put this in the head section:

```

   jQuery(document).ready(function() {
     $("time.timeago").timeago();
   });

```

This will turn all `` elements with a class of `timeago` and a `datetime` attribute formatted according to the [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) standard:

```
December 17, 2011
```

into something like this:

```
about 1 day ago
```

`` elements (or any other HTML elements) are also supported (this is for [legacy microformat support](http://microformats.org/wiki/datetime-design-pattern)and was originally supported by the library before the `time` element was introduced to HTML5):

```
December 17, 2011
```

As time passes, the timestamps will automatically update.

If you want to update a timestamp programatically later, call the `update`function with a new ISO8601 timestamp of `Date` object. For example:

```
$("time#some_id").timeago("update", "2013-12-17T09:24:17Z");
// or
$("time#some_id").timeago("update", new Date());
```

**For more usage and examples**:

**For different language configurations**: visit the [`locales`](https://github.com/rmm5t/jquery-timeago/tree/master/locales) directory.

Settings
--------

[](#settings)

**`cutoff`** : Return the original date if time distance is older than `cutoff` (miliseconds).

```
// Display original dates older than 24 hours
jQuery.timeago.settings.cutoff = 1000*60*60*24;
```

Changes
-------

[](#changes)

VersionNotes1.6.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v1.5.4...v1.6.7)) Wraped locales in UMD wrappers; locale improvements1.5.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v1.4.3...v1.5.4)) Added Date as argument to update function; locales1.4.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v1.3.2...v1.4.3)) Added allowPast setting; locale updates1.3.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v1.2.0...v1.3.2)) Added updateFromDOM function; bug fixes; bower support1.2.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v1.1.0...v1.2.0)) Added cutoff setting; locale updates1.1.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v1.0.2...v1.1.0)) Added update function; locale updates1.0.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v0.11.4...v1.0.2)) locale updates; bug fixes; AMD wrapper0.11.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v0.10.1...v0.11.4)) natural rounding; locale updates;0.10.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v0.9.3...v0.10.1)) locale updates0.9.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v0.8.2...v0.9.3)) microsecond support; bug fixes0.8.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v0.7.2...v0.8.2)) `` element support; bug fixes0.7.x([compare](https://github.com/rmm5t/jquery-timeago/compare/v0.6.2...v0.7.2)) locale function overrides; unit tests......Author
------

[](#author)

[Ryan McGeary](http://ryan.mcgeary.org) ([@rmm5t](http://twitter.com/rmm5t))

License
-------

[](#license)

[MIT License](https://rmm5t.mit-license.org/)

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity63

Solid adoption and visibility

Community41

Growing community involvement

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 80.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~117 days

Recently: every ~105 days

Total

11

Last Release

2582d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/740?v=4)[Ryan McGeary](/maintainers/rmm5t)[@rmm5t](https://github.com/rmm5t)

---

Top Contributors

[![rmm5t](https://avatars.githubusercontent.com/u/740?v=4)](https://github.com/rmm5t "rmm5t (330 commits)")[![oliverklee](https://avatars.githubusercontent.com/u/765746?v=4)](https://github.com/oliverklee "oliverklee (10 commits)")[![pandeydip](https://avatars.githubusercontent.com/u/716706?v=4)](https://github.com/pandeydip "pandeydip (7 commits)")[![Zoramite](https://avatars.githubusercontent.com/u/107076?v=4)](https://github.com/Zoramite "Zoramite (4 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (4 commits)")[![m90](https://avatars.githubusercontent.com/u/1662740?v=4)](https://github.com/m90 "m90 (4 commits)")[![monoblaine](https://avatars.githubusercontent.com/u/540974?v=4)](https://github.com/monoblaine "monoblaine (4 commits)")[![Krule](https://avatars.githubusercontent.com/u/38747?v=4)](https://github.com/Krule "Krule (3 commits)")[![ryush00](https://avatars.githubusercontent.com/u/4997174?v=4)](https://github.com/ryush00 "ryush00 (3 commits)")[![kj415j45](https://avatars.githubusercontent.com/u/18349191?v=4)](https://github.com/kj415j45 "kj415j45 (3 commits)")[![mahemoff](https://avatars.githubusercontent.com/u/55860?v=4)](https://github.com/mahemoff "mahemoff (3 commits)")[![alexrabarts](https://avatars.githubusercontent.com/u/29395?v=4)](https://github.com/alexrabarts "alexrabarts (2 commits)")[![gitigitibangbang](https://avatars.githubusercontent.com/u/16353617?v=4)](https://github.com/gitigitibangbang "gitigitibangbang (2 commits)")[![oree](https://avatars.githubusercontent.com/u/135676?v=4)](https://github.com/oree "oree (2 commits)")[![oscarotero](https://avatars.githubusercontent.com/u/377873?v=4)](https://github.com/oscarotero "oscarotero (2 commits)")[![forabi](https://avatars.githubusercontent.com/u/1012761?v=4)](https://github.com/forabi "forabi (2 commits)")[![pedro-mendonca](https://avatars.githubusercontent.com/u/7371591?v=4)](https://github.com/pedro-mendonca "pedro-mendonca (2 commits)")[![ricick](https://avatars.githubusercontent.com/u/137188?v=4)](https://github.com/ricick "ricick (2 commits)")[![amenk](https://avatars.githubusercontent.com/u/1087128?v=4)](https://github.com/amenk "amenk (2 commits)")[![Jamil-Najafov](https://avatars.githubusercontent.com/u/3155556?v=4)](https://github.com/Jamil-Najafov "Jamil-Najafov (2 commits)")

---

Tags

jquerytimetimeagotimemicroformat

### Embed Badge

![Health badge](/badges/rmm5t-jquery-timeago/health.svg)

```
[![Health](https://phpackages.com/badges/rmm5t-jquery-timeago/health.svg)](https://phpackages.com/packages/rmm5t-jquery-timeago)
```

###  Alternatives

[symfony/clock

Decouples applications from the system clock

431168.9M205](/packages/symfony-clock)[knplabs/knp-time-bundle

Making your dates and durations look sensible and descriptive

6308.9M39](/packages/knplabs-knp-time-bundle)[league/period

Time range API for PHP

7335.4M21](/packages/league-period)[wapmorgan/morphos

A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time.

8351.3M7](/packages/wapmorgan-morphos)[brick/date-time

Date and time library

3623.3M61](/packages/brick-date-time)[aeon-php/calendar

PHP type safe, immutable calendar library

2079.7M16](/packages/aeon-php-calendar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
