PHPackages                             gburtini/humanize-php - 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. gburtini/humanize-php

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

gburtini/humanize-php
=====================

Provides functions for converting numbers and timestamps in to human friendly forms. Based on the Django Humanize API.

0.0.0(11y ago)151.1k↓50%2[1 issues](https://github.com/gburtini/Humanize-PHP/issues)ApachePHPPHP &gt;=5.0.0

Since Mar 31Pushed 9y ago2 watchersCompare

[ Source](https://github.com/gburtini/Humanize-PHP)[ Packagist](https://packagist.org/packages/gburtini/humanize-php)[ Docs](http://github.com/gburtini/HumanizePHP)[ RSS](/packages/gburtini-humanize-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Humanize PHP
============

[](#humanize-php)

*A quick port of the useful aspects of [Django's Humanize library](http://docs.djangoproject.com/en/1.3/ref/contrib/humanize/).*

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

[](#installation)

This package is available in Packagist/Composer as `gburtini/humanize-php`.

Features
--------

[](#features)

- `naturaltime($timestamp, $depth=1)` returns "5 minutes ago" type responses from timestamp. `$depth` indicates how many units we should break your timestamp in to.
- `apnumber($n)` returns the "Associated Press style" number, `$n`, where numbers 1 thru 9 are returned as a word.
- `intcomma($n)` comma-separates an integer, unlike Django, it does not respect format localization.
- `intword($n)` returns the "word" for a given large number, for example, 1000000 becomes 1.0 million.
- `naturalday($timestamp, $format)` returns "today", "yesterday" or "tomorrow" from a given `$timestamp`, alternatively returns the date in `$format`.
- `ordinal($n)` converts an integer in to its ordinal string (1st, 2nd, ...)
- `checkize($n)` converts a number in to its check (cheque) ready word form. 65535 becomes "sixty five thousand, five hundred and thirty five." *not in Django*

License
-------

[](#license)

Copyright (C) 2011-2015 Giuseppe Burtini

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this library except in compliance with the License. You may obtain a copy of the License at

```
http://www.apache.org/licenses/LICENSE-2.0

```

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

*Django is a registered trademark of the Django Software Foundation. The Humanize-PHP project has no association with the Django Software Foundation.*

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

4067d ago

### Community

Maintainers

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

---

Top Contributors

[![gburtini](https://avatars.githubusercontent.com/u/780031?v=4)](https://github.com/gburtini "gburtini (8 commits)")

---

Tags

readablehumanizenumbershuman-friendlytimestampsdjangohuman-ready

### Embed Badge

![Health badge](/badges/gburtini-humanize-php/health.svg)

```
[![Health](https://phpackages.com/badges/gburtini-humanize-php/health.svg)](https://phpackages.com/packages/gburtini-humanize-php)
```

###  Alternatives

[react/stream

Event-driven readable and writable streams for non-blocking I/O in ReactPHP

688126.8M194](/packages/react-stream)[kwn/number-to-words

Multi language standalone PHP number to words converter. Fully tested, open for extensions and new languages.

4235.0M21](/packages/kwn-number-to-words)[wapmorgan/morphos

A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time.

8351.3M7](/packages/wapmorgan-morphos)[icecave/repr

A library for generating string representations of any value, inspired by Python's reprlib library.

277.1M4](/packages/icecave-repr)[danielstjules/php-pretty-datetime

Generates human-readable strings for PHP DateTime objects

5791.9k](/packages/danielstjules-php-pretty-datetime)[rtlopez/decimal

An object oriented immutable arbitrary-precision arithmetic library for PHP

27262.8k2](/packages/rtlopez-decimal)

PHPackages © 2026

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