PHPackages                             commentar/time-ago - 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. commentar/time-ago

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

commentar/time-ago
==================

This package calculates the time since a specific `DateTime` object en displays it in a human readable format.

v0.0.3(12y ago)0181MITPHPPHP &gt;=5.4

Since Sep 7Pushed 12y ago1 watchersCompare

[ Source](https://github.com/Commentar/TimeAgo)[ Packagist](https://packagist.org/packages/commentar/time-ago)[ Docs](https://github.com/Commentar/TimeAgo)[ RSS](/packages/commentar-time-ago/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (4)Used By (0)

TimeAgo
=======

[](#timeago)

[![Build Status](https://camo.githubusercontent.com/84e17a5b55a02cb525bbc8194ae16f06de5bb056ff81a4d4cdcb9a6d3920fbf2/68747470733a2f2f7472617669732d63692e6f72672f436f6d6d656e7461722f54696d6541676f2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Commentar/TimeAgo) [![Scrutinizer Quality Score](https://camo.githubusercontent.com/8447d38c1fa37c070da8cc7c4f5293edbebe5a0e0a3af603d862d6138cee97d7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f6d6d656e7461722f54696d6541676f2f6261646765732f7175616c6974792d73636f72652e706e673f733d65396135353166376635333432336364656263333364633533306136653839636236626135386131)](https://scrutinizer-ci.com/g/Commentar/TimeAgo/) [![Code Coverage](https://camo.githubusercontent.com/34d9df11b7891ed0bc4a76d6846e37ada011d3fc87ec14be17ee5c9ef4bbcb89/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f436f6d6d656e7461722f54696d6541676f2f6261646765732f636f7665726167652e706e673f733d38323262626234366337396237353264346266653934373334633234656134636135646136313966)](https://scrutinizer-ci.com/g/Commentar/TimeAgo/) [![Latest Stable Version](https://camo.githubusercontent.com/6d795e786df436ea9bc8cf29de4c35ad260777d7f78f42c4019b6e38039bbd39/68747470733a2f2f706f7365722e707567782e6f72672f436f6d6d656e7461722f74696d652d61676f2f762f737461626c652e706e67)](https://packagist.org/packages/Commentar/time-ago) [![Total Downloads](https://camo.githubusercontent.com/24aace0d18e2b9511bc73361ed76266618ed9a47619bc3675b0934e64a6872ec/68747470733a2f2f706f7365722e707567782e6f72672f436f6d6d656e7461722f74696d652d61676f2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/Commentar/time-ago)

Date renderer for the [Commentar](https://github.com/Commentar/Commentar) project. This package calculates the time since a specific `DateTime` object en displays it in a human readable format. E.g. `5 minutes ago`.

The supported steps are:

- seconds
- minutes
- hours
- days
- weeks
- months
- years

It is installed by default when first installing the [Commentar](https://github.com/Commentar/Commentar) system.

Installation
------------

[](#installation)

*If you are running a standard installation of Commentar you don't have to install anything (it is the default timestamp formatter of the system).*

Add the formatter to the project's `composer.json` file:

```
"require": {
    "commentar/time-ago": "0.0.*",
}

```

Use it in your templates:

```

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

3

Last Release

4678d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce6ea4ee501375bd1be563f6deed94e889d57d6134e98486208e5bcd14026ec2?d=identicon)[PeeHaa](/maintainers/PeeHaa)

---

Top Contributors

[![PeeHaa](https://avatars.githubusercontent.com/u/1330296?v=4)](https://github.com/PeeHaa "PeeHaa (10 commits)")

---

Tags

formattertimedatecommentscommentar

### Embed Badge

![Health badge](/badges/commentar-time-ago/health.svg)

```
[![Health](https://phpackages.com/badges/commentar-time-ago/health.svg)](https://phpackages.com/packages/commentar-time-ago)
```

###  Alternatives

[knplabs/knp-time-bundle

Making your dates and durations look sensible and descriptive

6239.3M52](/packages/knplabs-knp-time-bundle)[league/period

Time range API for PHP

7335.7M22](/packages/league-period)[brick/date-time

Date and time library

3623.6M94](/packages/brick-date-time)[aeon-php/calendar

PHP type safe, immutable calendar library

20410.2M16](/packages/aeon-php-calendar)[tplaner/when

Date/Calendar recursion library.

5261.1M7](/packages/tplaner-when)[kartik-v/php-date-formatter

A Javascript datetime formatting and manipulation library using PHP date-time formats.

461.6M3](/packages/kartik-v-php-date-formatter)

PHPackages © 2026

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