Home / Date & Time / Timeago.js - Format datetime with time ago statement
Timeago.js - Format datetime with time ago statement

Timeago.js - Format datetime with time ago statement

Download Demo
  • Overview
  • Documents
User Rating: 4.3/5 ( 3 votes)
Your Rating:

timeago.js is a simple library (less than 2 kb) that is used to format datetime with *** time ago statement. eg: '3 hours ago'.

  • Localization supported.
  • Time ago and time in supported.
  • Real-time render supported.
  • Nodejs and browserjs supported.
  • Well tested.

Why ?

timeago.js was built to format date with `*** time ago` statement.

  • Avoid timestamps dated "1 minute ago" even though the page was opened 10 minutes ago;timeago refreshes automatically.
  • You can take full advantage of page caching in your web applications, because the timestamps aren't calculated on the server.
  • Very tiny(less than 2kb), and has no dependency, e.g. jQuery.

Such as

just now
12 seconds ago
3 minutes ago
2 hours ago
3 days ago
3 weeks ago
6 months ago
2 years ago

in 12 seconds
in 3 minutes
in 2 hours
in 24 days
in 6 months
in 2 years

Source: timeago.org

Scroll To Top