PHPackages                             nehlsen/time-formatter-bundle - 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. nehlsen/time-formatter-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

nehlsen/time-formatter-bundle
=============================

Small Utility to format remaining time of something into a human-readable form

2.0.1(1y ago)02[1 PRs](https://github.com/nehlsen/time-formatter-bundle/pulls)MITPHPPHP ^8.3

Since Sep 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nehlsen/time-formatter-bundle)[ Packagist](https://packagist.org/packages/nehlsen/time-formatter-bundle)[ RSS](/packages/nehlsen-time-formatter-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (12)Versions (6)Used By (0)

Time Formatter
==============

[](#time-formatter)

Small Utility class to format *remaining* time of something into a human-readable form.

Example
-------

[](#example)

Given `Milk` having a `bestBefore` Timestamp, we can calculate its remaining *lifetime* like so

```
/** @var Milk $myMilk */
$myMilk = $fridge->getMyMilk();
/** @var \DateTimeImmutable $bestBefore */
$bestBefore = $myMilk->getBestoBefore();

$secondsUntilBad = $bestBefore->getTimestamp() - time();

$formatter = new \nehlsen\TimeFormatterBundle\TimeFormatter\TimeFormatter();
$formattedBestBefore = $formatter->format($secondsUntilBad);
// $formattedBestBefore == '3 Days 1 Hour 17 Seconds';
```

For a range of options and examples see [example1.php](example/example1.php)

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

[](#installation)

1. Require the library ```
    composer require nehlsen/time-formatter
    ```
2. For the translations to work, the provided files can be used, copied, linked. But they are not enabled automatically.
    - [messages.en.yaml](translation/messages.en.yaml)
    - [messages.de.yaml](translation/messages.de.yaml)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

4

Last Release

589d ago

Major Versions

1.1.0 → 2.0.02024-09-28

### Community

Maintainers

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

---

Top Contributors

[![nehlsen](https://avatars.githubusercontent.com/u/1791962?v=4)](https://github.com/nehlsen "nehlsen (12 commits)")

---

Tags

phpsymfony-bundle

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nehlsen-time-formatter-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nehlsen-time-formatter-bundle/health.svg)](https://phpackages.com/packages/nehlsen-time-formatter-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M650](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[symfony/ux-toggle-password

Toggle visibility of password inputs for Symfony Forms

26508.0k5](/packages/symfony-ux-toggle-password)

PHPackages © 2026

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