Library / SDK
rmm5t/jquery-timeago avatar
rmm5t/jquery-timeago

jQuery Timeago is one JavaScript file with thirteen minor versions of history

:clock8: The original jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago").

3,789 stars690 forksJavaScriptMIT

At a glance

What is it?
rmm5t/jquery-timeago turns a machine-readable timestamp into a phrase that rewrites itself as time passes, and it does so by looking for one class name and rewriting the text of one element. The readme documents the mechanism precisely, and the changelog table is the other half of the story: thirteen minor versions, most of them adding one setting.
Who is it for?
jQuery Timeago suits a page that already has semantic timestamps in its markup and wants them to read naturally without a server rendering the current time. It does not suit a project that has abandoned the library it depends on, since the package declares a peer range for the library rather than bundling it.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 116 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • rmm5t/jquery-timeago3,789 ★ · -5
Star history
Repository2026-09-242026-11-25
rmm5t/jquery-timeago3.8k3.8k

-5 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

One class name and one attribute do all the work

The mechanism is small enough to state exactly. You load the library and the library's own file, then on document ready you select a selector and call the plugin on it. The selector in the example targets the time element with a particular class, and the library converts the contents of every matching element that carries a date-time attribute in a standard format. The before and after are shown side by side: the same element, the same attribute, and the visible text replaced with a relative phrase while the original human-readable date moves into a title attribute. That is the whole contract, and the reason the plugin is small is that the date was already in the page before the script ran.

html
<time class="timeago" datetime="2011-12-17T09:24:17Z" title="December 17, 2011">about 1 day ago</time>

The abbreviation element is supported for a reason

The readme supports a second element type and explains the history in one sentence, which is the kind of detail that tells you how old the library is. The other supported element is the abbreviation element, where the machine-readable value lives in the title attribute instead of a dedicated attribute, and the explanation is legacy microformat support: the library supported that pattern before the time element was introduced to the markup standard. So the two forms exist for the same reason a codebase has two code paths, and both are shown with examples. If you are writing new markup, the time element is the one to reach for.

Timestamps keep rewriting themselves

The line that explains the name is one sentence: as time passes, the timestamps will automatically update. That is the behaviour a static page cannot do on its own, and it is why a plugin rather than a template function is the answer. There is a corresponding programmatic hook, so if you know a timestamp has changed outside the page, you can push the new value in: call the update function with a new timestamp, and the readme shows both forms it accepts, a formatted string and a date object. The same history is reflected in the changelog, where a minor version notes that a date object was added as an argument to that update function.

One setting, and it is about when to stop being clever

There is a single documented setting and it is the right one to think about. A cutoff value returns the original date when the distance is older than a given number of milliseconds, and the example sets it to a day so that anything older than twenty-four hours shows its real date. That is the correct default for a reader: a comment thread from last March should say March, not forty-one weeks ago. The changelog shows the setting arriving in a minor version alongside locale updates, and a later minor version adding a companion setting that allows timestamps in the future, which is the other half of the same problem for feeds that publish ahead of time.

Locales are separate files, and the wrapper changed shape twice

Language support lives in its own directory, and the readme sends you there rather than documenting a configuration option, so adding a language means adding a file. The changelog shows locales appearing in almost every minor version, which is the real maintenance story of this library. Two entries are about the packaging rather than the text: one minor version added an AMD wrapper, and the most recent notes that locales were wrapped in a universal module wrapper instead. So a locale file changed shape after the fact, which is worth knowing if you are pinning an old version of a locale file against a new version of the library.

The package is one file with a library range, not a bundle

The manifest is unusually revealing for a plugin this small. There is one dependency and it is the library itself, declared as a range rather than an exact version, which is the correct way to do it and also means the library is not bundled: you load it yourself, exactly as the readme's first example shows two script tags. The main field and a separate module-manager field both point at the same single file, and a browser mapping is present too, so the file resolves under a bundler that looks it up by package name. Two keywords are declared, one for time and one for the markup convention it implements, and there is a separate manifest for a different package manager, which is a leftover from before the current one.

The root keeps a demo, a site domain file and a stray

The repository listing explains the project's age better than the readme does. There is a readme written in a markup dialect older than the one now used, a bower manifest alongside the package manifest for a package manager that no longer matters, a file naming a canonical domain, which is what a project page is deployed under, and an index page that is the demo. There is also a build script, a test directory, a contributions directory, and one file that is almost certainly an accident. So the tree serves three purposes at once: a published package, a documentation site with its own domain, and a live demo, which is why it is larger than one JavaScript file.

Editorial conclusion

jQuery Timeago suits a page that already has semantic timestamps in its markup and wants them to read naturally without a server rendering the current time. It does not suit a project that has abandoned the library it depends on, since the package declares a peer range for the library rather than bundling it. Before adopting it, check your jQuery version against the declared range, and remember that the relative text is regenerated on a timer, so a page with thousands of timestamps is doing that work continuously.

Frequently asked questions

What is jQuery used for?

The repository uses the library for one narrow job: finding timestamps already present in the markup and rewriting their visible text as a relative phrase that keeps updating. The dates come from a standard attribute on a time element, so the work is turning existing semantic markup into something that reads naturally on a page rendered at a different moment.

How can I format dates using jQuery?

Load the library and the plugin, then call the plugin on a selector once the document is ready. The target elements need a class name and a date-time attribute in a standard format, and the plugin replaces their text with a relative phrase while moving the original date into a title attribute. There is a single documented setting, a cutoff after which the original date is shown instead.

Is jQuery frontend or backend?

The question is not one this repository addresses. What it contains is a browser plugin that runs in the page: the readme shows two script tags and a document-ready handler, and the package declares a range of the library as a dependency rather than bundling it.

What is the newest version of jQuery?

The repository does not state the library's version. It declares a supported range as its only dependency, and the readme's first step is to load the library yourself before loading the plugin. The versions documented here are the plugin's own, where the most recent release entry in the history is a minor series that wrapped the locale files in a different module format.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. rmm5t/jquery-timeago on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/rmm5t-jquery-timeago.svg)](https://hysenlabs.com/projects/rmm5t-jquery-timeago)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/rmm5t-jquery-timeago.svg)](https://hysenlabs.com/projects/rmm5t-jquery-timeago)

Was this useful?