PHPackages                             technodelight/seconds-to-none - 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. technodelight/seconds-to-none

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

technodelight/seconds-to-none
=============================

Seconds to human / human to seconds

1.0.1(3y ago)01.4kMITPHPPHP ^7.0 || ^8.1

Since Mar 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/technodelight/seconds-to-none)[ Packagist](https://packagist.org/packages/technodelight/seconds-to-none)[ RSS](/packages/technodelight-seconds-to-none/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (4)Dependencies (1)Versions (7)Used By (0)

seconds-to-none
===============

[](#seconds-to-none)

Seconds to human / human to seconds

This is a very minimal library to allow conversion between human time duration representation and time in seconds. Usage:

```
$converter = new \Technodelight\SecondsToNone;
$textRepresentation = $converter->secondsToHuman(12345);
// => '3 hours 25 minutes 45 seconds'
$seconds = $converter->humanToSeconds('3 hours 25 minutes 45 seconds');
// => 12345

```

If you want, you can configure how the representations are looking like.

```
$config = new Technodelight\SecondsToNone\Config(['h' => 3600, 'm' => 60, 's' => 1, 'none' => 0]);
// above secondsToHuman output with the following config:
// 3 h 25 m 45 s

```

Or the above with a more precise look:

```
$config = new Technodelight\SecondsToNone\Config(['h' => 3600, 'm' => 60, 's' => 1, 'none' => 0], '%d%s');
// above secondsToHuman output with the following config:
// 3h 25m 45s

```

You can even swap the order by using a custom pattern:

```
$config = new Technodelight\SecondsToNone\Config(['h' => 3600, 'm' => 60, 's' => 1, 'none' => 0], '%2$ss%1$d');
// above secondsToHuman output with the following config:
// h3 m25 s45

```

This micro-library also comes with tests!

License
=======

[](#license)

The MIT License (MIT)

Copyright (c) 2016 Zsolt Gál

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~491 days

Recently: every ~613 days

Total

6

Last Release

1317d ago

Major Versions

0.2.1 → 1.0.02022-11-15

PHP version history (4 changes)0.1.1PHP ^5.5

0.2.1PHP ^5.5 || ^7.0

1.0.0PHP ^5.5 || ^7.0 || ^8.1

1.0.1PHP ^7.0 || ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/77a47c8d32780e9a7a8aadd58e7b7f835913edb7fdffd7b009a7b2be6a63283e?d=identicon)[technodelight](/maintainers/technodelight)

---

Top Contributors

[![technodelight](https://avatars.githubusercontent.com/u/1817035?v=4)](https://github.com/technodelight "technodelight (4 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")

---

Tags

human-computer-interactionphptimestamp

### Embed Badge

![Health badge](/badges/technodelight-seconds-to-none/health.svg)

```
[![Health](https://phpackages.com/badges/technodelight-seconds-to-none/health.svg)](https://phpackages.com/packages/technodelight-seconds-to-none)
```

PHPackages © 2026

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