hustcc/timeago.js

:clock8: :hourglass: timeago.js is a tiny(2.0 kb) library used to format date with `*** time ago` statement.

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 54 minutes ago
Added to GitGenius on September 12th, 2026
Created on June 23rd, 2016
Open Issues & Pull Requests: 9 (+0)
GitHub issues: Enabled
Number of forks: 404
Total Stargazers: 5,368 (+0)
Total Subscribers: 74 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 103.0 days
Mean response time: 623.5 days
90th percentile: 2014.4 days
Tracked items: 26

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 1
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 74 days
Stale 30+ days: 1
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

timeago.js is a lightweight JavaScript library that formats dates as relative time strings in the "time ago" format.

The library solves the problem of displaying human-readable relative timestamps, such as "3 hours ago" or "in 2 days", without requiring heavy dependencies. It works by accepting a date input—whether as a Date instance, timestamp, or date string—and converting it to a relative time expression. The tool supports both past and future time expressions and can automatically update DOM elements in real-time as time passes.

The project suits developers building web applications that need compact date formatting without bloat. It works in both Node.js and browser environments and can be loaded via npm or CDN. The library includes built-in support for English and Simplified Chinese locales, with a registration API for adding custom languages. Anyone adopting it should know that the entire library weighs less than 2 kilobytes, making it suitable for performance-sensitive applications. The tool originated as a rewrite of an older jQuery-dependent project, removing that dependency entirely.

The project maintains a well-tested codebase with test coverage for locale implementations. Development activity shows ongoing engagement with locale translations, as the maintainers actively encourage community contributions for additional language support through both issues and pull requests. The project accepts contributions for expanding the locale library and requires that new translations be tested before acceptance.