PHPackages                             symandy/duration - 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. symandy/duration

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

symandy/duration
================

PHP class for durations

v2.0.0(3y ago)17MITPHPPHP ^8.0CI failing

Since Aug 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Symandy/SymandyDuration)[ Packagist](https://packagist.org/packages/symandy/duration)[ RSS](/packages/symandy-duration/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

[![Actions Status](https://github.com/Symandy/SymandyDuration/workflows/CI/badge.svg)](https://github.com/Symandy/SymandyDuration/actions)[![Type Coverage](https://camo.githubusercontent.com/eb6b116b1a6323b68b7b08291e744db68f42a3f4968bf856b98ed8a7b926379d/68747470733a2f2f73686570686572642e6465762f6769746875622f53796d616e64792f53796d616e64794475726174696f6e2f636f7665726167652e737667)](https://shepherd.dev/github/Symandy/SymandyDuration)

Symandy Duration
================

[](#symandy-duration)

PHP package to represent durations

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

[](#installation)

- Add package to your project using composer

    `$ composer require symandy/duration`

Usage
-----

[](#usage)

- Instantiate `Symandy\Component\Duration\Duration` class

```
use Symandy\Component\Duration\Duration;

$duration = new Duration('4 minutes 40 seconds');
$duration = new Duration('4m 40s');
```

- Display at any format

```
use Symandy\Component\Duration\Duration;

$duration = new Duration('4 minutes 40 seconds');

echo $duration->format(); // Default : 0:04:40
echo $duration->format('%h:%m:%s'); // 0:04:40
echo $duration->format('%mm%ss'); // 4m 40s
```

- Add duration changes

```
use Symandy\Component\Duration\Duration;

$duration = new Duration('4 minutes 40 seconds');
$duration->addMinutes(10);

echo $duration->format('%mm%ss'); // 14m 40s
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~996 days

Total

2

Last Release

1114d ago

Major Versions

v1.0.0 → v2.0.02023-04-30

PHP version history (2 changes)v1.0.0PHP ^7.4.0

v2.0.0PHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![SVillette](https://avatars.githubusercontent.com/u/17042730?v=4)](https://github.com/SVillette "SVillette (14 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/symandy-duration/health.svg)

```
[![Health](https://phpackages.com/badges/symandy-duration/health.svg)](https://phpackages.com/packages/symandy-duration)
```

PHPackages © 2026

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