PHPackages                             vistag/human-readable - 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. vistag/human-readable

ActiveLibrary

vistag/human-readable
=====================

Convert numbers and seconds to the human readable format

142.8k1PHP

Since Jan 29Pushed 8y agoCompare

[ Source](https://github.com/VistagGit/human-readable)[ Packagist](https://packagist.org/packages/vistag/human-readable)[ RSS](/packages/vistag-human-readable/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (1)Used By (1)

Human readable numbers and time
===============================

[](#human-readable-numbers-and-time)

Human readable numbers and time package

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

[](#installation)

You can install this package via composer using this command:

```
 composer require vistag/human-readable
```

Usage
-----

[](#usage)

### Numbers

[](#numbers)

```
use Vistag\HumanReadable\ReadableNumber;

$number = new ReadableNumber(550);

$number->raw();
// 550
$number->short();
// 550
$number->long();
// 550

$number = new ReadableNumber(1515);

$number->short();
// 1.5k
$number->long();
// 1.51k

$number = new ReadableNumber(155550);

$number->short();
// 155k
$number->long();
// 155.55k

$number = new ReadableNumber(5999900);

$number->short();
// 5.9M
$number->long();
// 5.99M
```

See tests for more examples.

### Seconds

[](#seconds)

```
use Vistag\HumanReadable\ReadableSeconds;

$seconds = new ReadableSeconds(990);

$seconds->raw();
// 990
$seconds->short();
// 990s
$seconds->long();
// 16m 30s

$seconds = new ReadableSeconds(1010);

$seconds->short();
// 16m
$seconds->long();
// 16m 50s

$seconds = new ReadableSeconds(155550);

$seconds->short();
// 151m
$seconds->long();
// 2h 31m

$seconds = new ReadableSeconds(5999900);

$seconds->short();
// 27h
$seconds->long();
// 27.6h
```

See tests for more examples.

Support
-------

[](#support)

If you believe you have found an issue, please report it using the [GitHub issue tracker](https://github.com/VistagGit/human-readable/issues), or better yet, fork the repository and submit a pull request.

If you're using this package, I'd love to hear your thoughts. Thanks!

License
-------

[](#license)

The MIT License (MIT). [Vistag.com](https://vistag.com)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5340ba8a7477c30ad3bb88b15878a056228a0280182330f2d63c82bf6d2f1fdb?d=identicon)[vistag](/maintainers/vistag)

---

Top Contributors

[![rorecek](https://avatars.githubusercontent.com/u/6564004?v=4)](https://github.com/rorecek "rorecek (2 commits)")[![VistagGit](https://avatars.githubusercontent.com/u/35762264?v=4)](https://github.com/VistagGit "VistagGit (1 commits)")

### Embed Badge

![Health badge](/badges/vistag-human-readable/health.svg)

```
[![Health](https://phpackages.com/badges/vistag-human-readable/health.svg)](https://phpackages.com/packages/vistag-human-readable)
```

PHPackages © 2026

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